GNOME Bugzilla – Bug 728338
Media art should be saved in JPEG format
Last modified: 2016-10-04 12:13:10 UTC
Currently, we just download the media art if it doesn't exists and a URL for the thumbnail is available from grilo, then saves it to the cache, hoping that it is a JPEG file. We should use libmediaart here to save the media art, which converts it to JPEG. https://wiki.gnome.org/MediaArtStorageSpec states that all media art should be in JPEG.
Created attachment 274472 [details] [review] albumArtCache: Convert downloaded media covers to JPEG Use libmediaart to save the media covers so that they will be converted to JPEG.
Review of attachment 274472 [details] [review]: ::: gnomemusic/albumArtCache.py @@ +209,3 @@ + f = Gio.File.new_for_uri(uri) + success, contents, etag = f.load_contents(None) + streamInfo = f.query_info('standard::content-type', FileQueryInfoFlags.NONE, None) Got "Error: global name 'FileQueryInfoFlags' is not defined" here when applied the patch
Review of attachment 274472 [details] [review]: Also I get tons of: (gnome-music:14717): libmediaart-CRITICAL **: storage_get_device_roots: assertion 'IS_STORAGE (storage)' failed which is probably libmediaart's fault, but it might be us setting some flags incorrectly
Created attachment 274514 [details] [review] albumArtCache: Convert downloaded media covers to JPEG Ugh, forgot to initialize libmediaart and the Gio prefix on that enum.
Review of attachment 274514 [details] [review]: This needs rebasing after https://git.gnome.org/browse/gnome-music/commit/?id=41e7d8c (running callbacks in main thread). I'm not really good at this, so setting as 'needs-work'
Created attachment 320637 [details] [review] make sure thumbanils are jpg Fresh go at this, since the older patch seems a bit bitrotten. Different approach: download the file to a tmp file, let libmediaart convert it to jpg and just save it to the mediaart suggested location.
I've added a wip/mschraal/coverart branch on git, which should fix this issue. Please test and report back. Note that you need to remove your coverart (~/.cache/mediaart) and redownload to get the desired effect. This also mean reindexing of all your music files (as that is a possible coverart provider as well).
See #7 This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.