Plugin updates for Picard 2.0

picard
picardplugins
Tags: #<Tag:0x00007fe3d0b260b8> #<Tag:0x00007fe3d0b25f78>

#1

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.


#2

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.

I made a report here: https://github.com/metabrainz/picard-plugins/issues/163


#3

The BPM plugin does not support Windows. Please see https://tickets.metabrainz.org/browse/PICARD-1335 and related issues.


#4

Gotcha, thanks. I’ll vote for those.


#5

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


#6

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.


#7

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.


#8

The fix was deployed, lastfm plugin version 0.8


#9

@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!


#10

@culinko, please have a look at https://github.com/rdswift/picard-plugins/raw/2.0_working/plugins/smart_title_case/smart_title_case.py and see if it works for you. It’s a quick hack, but if it works I’ll clean it up and submit it formally. Thanks.


#11

Great job! The plugin works without any errors and I haven’t been able to find any issues so far.


#12

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.


#13

@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>”

Here is an example release where such behavior occurs when your load it into Picard: https://musicbrainz.org/release/876ae6ae-f649-4f7b-a980-ab135cfb1a1c?tport=8000

Here is a screenshot of said release loaded into Picard:

I used the following script to show the albumartists tag: $setmulti(albumartists,%_albumartists%)

Thank you so much for looking at this issue, much appreciated!