local-metadata: no thumbnail reported for Vorbis with embedded art
Submitted by Simon McVittie
Assigned to gri..@..e.bugs
Link to original bug (#752437)
Description
I'm not 100% sure whether this is a Grilo bug or a libmediaart bug, but it seems to be easier to fix via grilo-plugins, so I'm filing it here for now.
Steps to reproduce:
-
have a Vorbis track with embedded art in Base64 in the METADATA_BLOCK_PICTURE Vorbis comment field, of type 3 (FRONT_COVER) (the example I have appears to be a conversion of https://www.jamendo.com/en/track/132873/mami-dale to Vorbis, I'm not sure what converter was used)
-
put it in ~/Music
-
let XFCE's Tumbler (an implementation of http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html) find it and generate a thumbnail in ~/.cache/thumbnails; GNOME's thumbnailing code would probably work equally here, but I haven't tried it
-
let Tracker index it
- tracker-extract processes it with libmediaart, and does not find folder.jpg etc. adjacent to it
- in this particular situation we do not have any ability to find media art via network searches, so that possibility can be ignored
-
browse media objects in all Grilo sources
-
resolve each media object with flags including GRL_METADATA_KEY_ARTIST, GRL_METADATA_KEY_ALBUM, GRL_METADATA_KEY_THUMBNAIL and ask Grilo for metadata, in particular grl_media_get_thumbnail()
Expected result:
-
either option 1:
- Grilo returns the URL to the thumbnail from ~/.cache/thumbnails or option 2:
- libmediaart extracts the embedded art and stores it in ~/.cache/media-art
- Grilo returns the URL to the copy in ~/.cache/media-art
-
either way, the thumbnail is the embedded art
Option 1 seems to be easier to implement, and it results in the track looking precisely the same in a media-oriented application as it does in a generic file manager like Nautilus or Thunar, which seems like a nice property to have. I'm working on a patch for this.
Option 2 seems to be harder to achieve in the short term, because the libmediaart API seems to mostly be in terms of (artist, album) pairs, which doesn't play nicely with per-track cover images (e.g. look at The Slip or Ghosts I-IV by Nine Inch Nails). It also breaks down if the process writing to the cache and the process reading it disagree on what the relevant artist and album are.
Version: 0.2.x