I developed Deezerart

Tags: #<Tag:0x00007fe317692dd0> #<Tag:0x00007fe3176911d8> #<Tag:0x00007fe317690f08>

Hi,

I developed Deezerart, a Picard plugin to fetch cover arts from Deezer, a music streaming platform. Deezer provides free APIs with a reasonable time limit that are perfect for such a plugin.

Deezerart has been tested from Python 3.5 to Python 3.8, to maximize compatibility, although I only tested it in Picard 2.4 since that’s the version my distro ships.
I tried to use all the cover-art-related APIs in Picard so that every menu entry and error message appears in the right place, well integrated with the overall application.

It is my intention to create a pull request to add my plugin to the official third party Picard plugins, should you wave the green flag.

I hope you’ll enjoy Deezerart!

13 Likes

Thanks a lot, this looks very cool. Also cleanly coded. Would indeed be great to have this in the official plugin list.

I have not yet looked over it in too much detail, but I don’t think there is much to complain. One thing I noted though:

There is custom code for redirect handling, which runs on the main thread and hence adds a noticeable delay. That made me wonder why this is needed, because the web service module should handle redirects just well. Turns out it is because the CoverArtImage does not handle query arguments correctly, which in turn results a URL like https://api.deezer.com/album/393516/image?size=big getting queried as https://api.deezer.com/album/393516/image%3Fsize=big and there is not even a redirect involved.

So that’s a bug, I’ll see to get this fixed for the 2.5 release. But then we could get rid of the custom redirect handling in the plugin. Which would be great: Not only does it currently block the main thread, it also makes the app crash without any exception logged on Windows (if using the official binaries). I don’t know why exactly, but there might be something missing in the package because Picard otherwise does not use the http.client module.

Update: We’ll have a fix for the next release

5 Likes

Thanks for looking into it, @outsidecontext. Also, wow, you discovered a bug just by supposing why I wrote a workaround O_O

I’ll patch Deezerart to avoid the workaround for Picard versions greater or equal to 2.5, tag a v1.0.1 and then I’ll submit a PR.

3 Likes

@livingsilver94 Could you put a working add-on file here, it looks like a great job, I’d love to test it.