A couple of plugins have received important updates for Picard 2.0. Picard 2.0 introduced fundamental changes, which meant all plugins needed to be updated to being compatible for Picard 2.0. Most plugins were, but unfortunately some plugins just got under the wheels. So a few days ago I went looking over all plugins and fix the most pressing issues. Here is a some summary of what changed:
fanart.tv cover art 1.4
This one had a stupid bug in the Picard 2 version that caused it to not submit proper API credentials to fanart.tv, thus never returning any data. My fault, sorry.
Last.fm 0.7
Yes, the Last.fm plugin is back from the dead! This plugin already stopped working for Picard 1 when Last.fm introduced breaking changes to their API. There was some attempt to update the plugin, but then Picard 2 happened and this got stalled. Anyway, it is back again for Picard 2. It even got a new feature and now optionally allows regular expressions for excluding tags.
Last.fm.Plus was removed
Unfortunately this plugin is gone for now and was removed from the plugin list. It also needs updates for Picard 2 and Last.fm API 2.0, but unless somebody is willing to do these updates and to maintain this plugin (I wonāt) it is now officially dead. IMHO this plugins UI and code are too cluttered and overloaded. Iād rather add important functionality from this plugin to the standard Last.fm plugin. And if for you the standard Last.fm plugin doesnāt have enough features Iād recommend using the Last.fm.ng Plugin.
No release
The no release plugin, which allows you to remove any release specific information from a release, needed updates for Picard 2.0. This is now done.
Going forward I want to tackle a few more issues with existing plugins to improve the overall plugin quality. Currently on my list is the āMusixmatch Lyricsā, which blocks the UI while it is loading data, and reviewing the AcousticBrainz and Wikidata plugins, since those where reported to cause crashes and loading issues. For Wikidata there is already work in progress. Also I would like to get the Classical Extras plugin by @MetaTunes into the official plugin page.
I just updated Picard to 2.0.4 and updated most of the plugins, too. However, I canāt install the last.fm plugin at all. Nothing happens when I hit the install button. Iāll see if I can get it done manually.
Edit: No luck with manual install from the included .zip file. Even tried switching out the files for the latest online.
Edit again: I had a bunch of stuff left on my computer from the switch between Program Files (x86) and Program Files. So I saved the settings, removed everything, and reinstalled. Then it installed ok. The only one not working now is BPM.
Trying to make this work, no luck so far. Installed the plugin, it shows up in plugin tab properly, even the sub-menu is there. However, it doesnāt add the Genre tag to any tested popular releases. When I ticked āUse artists tagā option, I get a following error:
E: 21:49:30,695 C:\Users\furma\AppData\Local\MusicBrainz\Picard\plugins\lastfm.zip\lastfm_init_._tags_downloaded:123: Problem processing download tags
Traceback (most recent call last):
File "C:\Users\furma\AppData\Local\MusicBrainz\Picard\plugins\lastfm.zip\lastfm_init_.py", line 109, in _tags_downloaded
if not matches_ignored(ignore, name):
File "C:\Users\furma\AppData\Local\MusicBrainz\Picard\plugins\lastfm.zip\lastfm_init_.py", line 63, in matches_ignored
if isinstance(pattern, re.Pattern):
AttributeError: module āreā has no attribute āPatternā
Anyone else getting this? I am on Picard 2.0.4. windows version. Plugins: featartistsintitles, lastfm, no_release, release_type, standardise_feat
Sorry for that, I just realized the code is incompatible with anything below Python 3.7, and the Picard Windows version currently ships with Python 3.6. I will provide a fixed version.
Thank you for your work on these. I have been struggling with the genre tag since 2.0 was released, so I am glad that these plugins are being looked into.
@outsidecontext I know you are busy with the plugins you listed and your other work on Picard (which is greatly appreciated, btw!) but I was wondering, could find some time to port the plugin āSmart Title Caseā to api v2? Itās pretty much the only important plugin that I use that hasnāt been ported yet. Thanks a lot!
Thanks for letting me know. I hate to admit it, but I didnāt test it thoroughly here before turning you loose on it. Iāll have to wait until tomorrow to clean it up and submit it. I just got back from an eye examination and I can barely see because of the drops in my eyes.
@rdswift Hi, I just found a bug in the Smart Title Case plugin. Iām not sure if it was already present before you ported it to the v2 api, though. Could you look at it if you get some time, please? Below is the bug description and reproduction steps:
The following tags are affected: artists, ~albumartists
The following are some examples of affected artists: Armin van Buuren, Sharon den Adel, Hayley Williams of Paramore, blink-182
These artists are being changed into stuff such as ā<map object at 0x0000000005837E80>ā
Please download the updated file from my repository on GitHub and let me know if this corrects the problem. If so, Iāll submit a pull request to update the master files used by Picard. Thanks.
Iām highjacking this threat and hope this is ok. I used a plugin with picard 1.42 to generate title sort tags. I donāt remember where I got it from. Now I changed to Picard 2.3.2 and obviously the plugin is not working anymore. Sadly I have no idea how to update the old plugin to work with the new api.
Could someone help me with it please. Just changing the api numbers in not doing the job.
PLUGIN_NAME = 'Title sort names'
PLUGIN_AUTHOR = 'Jacob Rask'
PLUGIN_DESCRIPTION = 'Guesses title and album sortnames (language specific) and adds as titlesort and albumsort tags.'
PLUGIN_VERSION = "0.1.4"
PLUGIN_API_VERSIONS = ["0.12", "0.15"]
from picard.metadata import register_track_metadata_processor
from picard.metadata import register_album_metadata_processor
import re
# define articles
_articles = {}
_articles['deu'] = ['Der ', 'Das ', 'Die ', 'Eine? '] # German
_articles['eng'] = ['Th[ae] ', 'Da ', 'An? '] # English
_articles['esp'] = ['El ', 'La ', 'L[ao]s ', 'Una? ', 'Un[ao]s '] # Spanish
_articles['fra'] = ["Les? ", "La ", "L'", "Une? ", "Des "] # French
_articles['ita'] = ["Il ", "L[aeo] ", "L'", "I ", "Gli ", "Un[ao]? ", "Un'"] # Italian
_articles['swe'] = ['De[nt]? ', 'Dom ', 'E(n|tt) '] # Swedish
# compile sort language regular expressions
_re_articles = {}
_regmul = ''
for lang, a in _articles.iteritems():
reg = ''
for i in range(len(a)):
reg = '|^' + _articles[lang][i] + reg
_re_articles[lang] = re.compile(reg[1:])
_regmul = _regmul + reg
# all articles are collected and used for "multiple languages"
_re_articles['mul'] = re.compile(_regmul[1:])
def make_sorttitle(title, lang):
if lang not in _re_articles:
lang = "mul"
sort_re = _re_articles[lang]
match = sort_re.match(title)
titlesort = title
if match:
sort_prefix = match.group().strip()
titlesort = sort_re.sub("", title).strip() + ", " + sort_prefix
titlesort = titlesort[0].upper() + titlesort[1:] # capitalize first letter
return titlesort
def add_titlesort(tagger, metadata, release, track):
if metadata["titlesort"]:
titlesort = metadata["titlesort"]
else:
titlesort = metadata["title"]
metadata["titlesort"] = make_sorttitle(titlesort, metadata["language"])
def add_albumsort(tagger, metadata, release):
if metadata["albumsort"]:
titlesort = metadata["albumsort"]
else:
titlesort = metadata["album"]
metadata["albumsort"] = make_sorttitle(titlesort, metadata["language"])
register_track_metadata_processor(add_titlesort)
register_album_metadata_processor(add_albumsort)