From 7a47dc9c35b60c17f3ec71f82a05e021c440fe49 Mon Sep 17 00:00:00 2001 From: Chad Wilson Date: Sat, 26 May 2012 16:56:15 +0800 Subject: [PATCH] Fix the addrelease plugin to be compatible with changes made to the metadatabox and clusters (clusters no longer have the 'artist' tag; only 'albumartist'). Updated the compatible API version accordingly. If we don't release next version as 1.0, please chage the plugin' API version accordingly! --- contrib/plugins/addrelease.py | 11 ++++++----- picard/__init__.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/addrelease.py b/contrib/plugins/addrelease.py index 131b8f222..55ebcc832 100644 --- a/contrib/plugins/addrelease.py +++ b/contrib/plugins/addrelease.py @@ -2,9 +2,10 @@ PLUGIN_NAME = u"Add Cluster As Release" PLUGIN_AUTHOR = u"Lukáš Lalinský, Philip Jägenstedt" -PLUGIN_DESCRIPTION = "" -PLUGIN_VERSION = "0.2" -PLUGIN_API_VERSIONS = ["0.9.0", "0.10", "0.15.0"] +PLUGIN_DESCRIPTION = "Adds a plugin context menu option to clusters to help you quickly add a release into the MusicBrainz\ + database via the website by pre-populating artists, track names and times." +PLUGIN_VERSION = "0.3" +PLUGIN_API_VERSIONS = ["1.0.0"] from picard.cluster import Cluster from picard.util import webbrowser2 @@ -49,7 +50,7 @@ class AddClusterAsRelease(BaseAction): f.write(HTML_HEAD) - nv("artist_credit.names.0.artist.name", cluster.metadata["artist"]) + nv("artist_credit.names.0.artist.name", cluster.metadata["albumartist"]) nv("name", cluster.metadata["album"]) for i, file in enumerate(cluster.files): @@ -67,7 +68,7 @@ class AddClusterAsRelease(BaseAction): nv("mediums.%d.track.%d.%s" % (m, i, n), v) tnv("name", file.metadata["title"]) - if file.metadata["artist"] != cluster.metadata["artist"]: + if file.metadata["artist"] != cluster.metadata["albumartist"]: tnv("artist_credit.names.0.name", file.metadata["artist"]) tnv("length", str(file.metadata.length)) diff --git a/picard/__init__.py b/picard/__init__.py index 9fbc351e1..3af63ab45 100644 --- a/picard/__init__.py +++ b/picard/__init__.py @@ -28,5 +28,5 @@ else: version_string = '%d.%d.%d%s%d' % version_info __version__ = version_string -api_versions = ["0.15.0", "0.15.1", "0.16.0"] +api_versions = ["0.15.0", "0.15.1", "0.16.0", "1.0.0"]