mirror of
https://github.com/fergalmoran/picard.git
synced 2026-04-28 23:31:18 +00:00
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!
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user