-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add plugin to set website from relations #341
base: 2.0
Are you sure you want to change the base?
add plugin to set website from relations #341
Conversation
this do not attache existing artist website plugin and can used separate to it it is add currently the url from album-artist, release and release-group
PLUGIN_NAME = 'Musicbrainz Relations Website' | ||
PLUGIN_AUTHOR = 'Tobias Sarner' | ||
PLUGIN_DESCRIPTION = '''Uses Musicbrainz relations to set website advanced. | ||
-Album Artist Website- plugin, can used separate to set album artist(s) Official Homepage(s) and will not attached by this plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am entirely unclear from this description what the relationship of this plugin is to my Album Artist Website plugin. But I wonder whether this functionality would be better served by adding it to the Album Artist Website plugin (renaming it Websites Metadata perhaps) rather than creating a new one.
website:release-group_1_https://www.discogs.com/master/2831825''' | ||
PLUGIN_LICENSE = "GPL-2.0" | ||
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.txt" | ||
PLUGIN_VERSION = "1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is experimental, the version number should be 0.0.1.
WARNING: Experimental plugin. All guarantees voided by use. | ||
|
||
Example: Taylor Swift | ||
website:artist_1_official homepage https://www.taylorswift.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I am not sure that you can just suffix the existing
website
tag with:subtag
and not screw up the existing usage ofwebsite
without a suffix. From memory (which is old and may be wrong) Picard knows which tags are multi-value, and AFAIKwebsite
is not one of them. website
is explicitly mapped to e.g. the ID3v2 WOAR tag which is explicitly for the Album Artist official webpage. The WOAS tag is defined in ID3v2 as holding the official web page for the Release, and Picard needs a definition of a metadata name for this and a mapping to ID3 and other tagging formats to defined how it is loaded and saved.- Similarly there is a WXXX:subtag tag in ID3v2 to hold miscellaneous URLs that do not have explicit tags - so e.g. the Discord URL should be saved in WXXX:discord, and again a mapping from metadata to WXXX would be needed in Picard to support this. I don't have any issues with the idea of storing the Discord URL for use in players, but if we are going to support Discord we should probably also have a Discord-Release metadata variable which holds the discord release number and Discord-Release Group to store the Discord master release number. Discord URLs can then be generated from these if you double click on them in Picard.
So, what I am saying is that ideally there would need to be a Picard enhancement to support the metadata you want to hold and make sure it gets saved in the write tags for the various formats. If someone is going to do this, then a comprehensive review of ID3 tags and other formats and a full mapping of these to metadata names would be a great enhancement IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without further knowledge Picard would just save a TXXX:website:subtag
, so that would not be a problem in general. Even though some tags use colons for special behavior (e.g. comment:description
), there is nothing special per se for this notation.
But anyway, I totally agree with the points you make above. It would be better if support for WXXX
(and in general more of the W***
webpage tags) would exist. As a first step having website:subtag
mapped to WXXX:subtag
sounds sensible. But we could also directly support let's say website:pay
for WPAY
(PICARD-1394) or so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added PICARD-2587 as a start. Not yet sure if my suggestion is the best idea.
MUSICBRAINZ_HOST = "musicbrainz.org" | ||
MUSICBRAINZ_PORT = 80 | ||
|
||
ratecontrol.set_minimum_delay((MUSICBRAINZ_HOST, MUSICBRAINZ_PORT), 50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO you absolutely should not override the ratecontrol in a plugin like this.
"fmt": "json", | ||
"inc": "url-rels" | ||
} | ||
album.tagger.webservice.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I wrote the Artist website plugin, the artist official website was not available in the standard release metadata (even with the extra relations enabled) so I wrote the plugin to make an additional webservice call. BUT, since it was likely that a user might be tagging multiple albums for the same artist, I spent a lot of time crafting a caching mechanism, so that you only made 1 call per artist for the lifetime of the Picard execution process. If you are going to duplicate the functionality to make such a webservice call, you probably ought to reuse the caching code I wrote.
album.tagger.webservice.get( | ||
config.setting["server_host"], | ||
config.setting["server_port"], | ||
"/ws/2/release/" + metadata["musicbrainz_albumid"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picard has already downloaded this information - why are you repeating the call?
album.tagger.webservice.get( | ||
config.setting["server_host"], | ||
config.setting["server_port"], | ||
"/ws/2/release-group/" + metadata["musicbrainz_releasegroupid"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Picard has also already downloaded this information - why are you repeating the call?
P.S. I encourage you to continue to work on this plugin - community contributions are always welcome IMO. But writing plugins does have a learning curve - sorry. |
remove request of release, because its already there set releation of release from processor
website:release-group_1_https://www.discogs.com/master/2831825''' | ||
PLUGIN_LICENSE = "GPL-2.0" | ||
PLUGIN_LICENSE_URL = "https://www.gnu.org/licenses/gpl-2.0.txt" | ||
PLUGIN_VERSION = "1.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to increment the version except from one published version to another. This plugin has not yet been published, so you don't need to increment the version. But as previously stated, since this experimental it should probably be version 0.0.1 at the moment.
@@ -0,0 +1,140 @@ | |||
# -*- coding: utf-8 -*- | |||
# Critiquebrainz plugin for Picard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor point, but this is NOT the Critiquebrainz plugin.
set version to experimental minor number
To that 3 points of ID3 tags. |
|
this do not attache existing artist website plugin and can used separate to it
it is add currently the url from album-artist, release and release-group