We have moved to a new Sailfish OS Forum. Please start new discussions there.
15

mediaplayer shows albums with various artists without cover in the album overview

asked 2014-01-22 14:04:57 +0300

pvcn gravatar image

updated 2014-07-24 10:53:05 +0300

jiit gravatar image

It seems like the mediaplayer shows no album covers in the album overview for albums with various artists. If the album is played and the application is minimized, the album art is shown in the home screen, so the cover must be in the tag. How come?

edit retag flag offensive close delete

Comments

1

This is indeed annoying. (Almost) All my imported music files from my N9 does not show the album covers in the album overview...

Also see: https://together.jolla.com/question/19335/howto-correct-tagging-of-mp3-files/

Alex ( 2014-01-29 21:20:58 +0300 )edit
1

With the hints from question 30984 I figured out that tracker ist emitting an album artwork file

album-ARTIST-ALBUM.jpeg
for the artist name " " (single space) and symlinks for every track artist. For example Trainspotting results in

album-7215ee9c7d9dc229d2921a40e899ec5f-fe510879a3c6eed2f13b1c36b64114d0.jpeg
album-8596414d7187ef85bd1f226bae7cb493-fe510879a3c6eed2f13b1c36b64114d0.jpeg

and so on.

When entering the album overview jolla-mediaplayer stats (strace jolla-mediaplayer | grep fe51) the non-existent artwork files

album-d41d8cd98f00b204e9800998ecf8427e-fe510879a3c6eed2f13b1c36b64114d0.jpeg

(empty artist string) three times and

album-7501ea3428be2a5be938e78af7802964-fe510879a3c6eed2f13b1c36b64114d0.jpeg

(I have no idea) one time.

lechris ( 2014-05-19 03:10:51 +0300 )edit
1

... When entering the track overview of this album the individual artists get stat-ed as expected. For example

album-album-b8981465ac9939ba93b3842ce172c3e3-fe510879a3c6eed2f13b1c36b64114d0.jpeg
for Iggy Pops Lust for Life.

Why does jolla-mediaplayer check for the empty artist while tracker generates a file for the "single space artist"? Is this intentional or just a misunderstanding beween these two?

Edit: meanwhile I figured out that 7501ea3428be2a5be938e78af7802964 is the MD5 of Verschiedene Interpreten/Various Artists.

lechris ( 2014-05-19 03:21:57 +0300 )edit
1

What about just looking up the single space artist/album name artwork generated by the tracker as a fallback?

lechris ( 2014-05-21 00:06:23 +0300 )edit

@lechris: I don't understand what you are trying all the time but if you are looking for how to get the right cover name you can follow the instructions in this post . :)

Alex ( 2014-05-21 08:44:16 +0300 )edit

1 Answer

Sort by » oldest newest most voted
9

answered 2017-09-29 09:58:03 +0300

onitake gravatar image

updated 2017-09-29 19:52:06 +0300

I found out how MediaPlayer obtains its metadata. It's all in the JavaScript helper library /usr/lib/qt5/qml/com/jolla/mediaplayer/AudioTrackerHelpers.js.

By modifying the SPARQL query, you can coax it into processing the albumArtist field of each song, if there is one. This will make MediaPlayer display the artist correctly, and, as a bonus, load the correct album artwork.

Edit: Sorry, I messed up the patch order. Fixed now.

Here's a patch:

--- a/usr/lib/qt5/qml/com/jolla/mediaplayer/AudioTrackerHelpers.js  2017-09-29 08:48:54.075622192 +0200
+++ b/usr/lib/qt5/qml/com/jolla/mediaplayer/AudioTrackerHelpers.js  2017-09-29 08:46:07.139758637 +0200
@@ -71,7 +71,7 @@
         "\"grilo#Box\" " +
         "tracker:coalesce(tracker:id(nmm:musicAlbum(?urn)), 0) AS ?id " +
         "tracker:coalesce(nmm:albumTitle(nmm:musicAlbum(?urn)), \"%12\") AS ?title " +
-        "IF(COUNT(DISTINCT(tracker:coalesce(nmm:performer(?urn), 0))) > 1, \"%13\", tracker:coalesce(nmm:artistName(nmm:performer(?urn)), \"%11\")) AS ?author " +
+        "IF(COUNT(DISTINCT(tracker:coalesce(nmm:albumArtist(nmm:musicAlbum(?urn)), nmm:performer(?urn), 0))) > 1, \"%13\", tracker:coalesce(nmm:artistName(nmm:albumArtist(nmm:musicAlbum(?urn))), nmm:artistName(nmm:performer(?urn)), \"%11\")) AS ?author " +
         "COUNT(DISTINCT(?urn)) AS ?childcount " +
         "\"%3\" AS tracker-urn "

@@ -87,7 +87,7 @@
         "{ SELECT " +
             "tracker:coalesce(tracker:id(nmm:musicAlbum(?urn)), 0) AS ?id " +
             "tracker:coalesce(nmm:albumTitle(nmm:musicAlbum(?urn)), \"%12\") AS ?title " +
-            "IF(COUNT(DISTINCT(tracker:coalesce(nmm:performer(?urn), 0))) > 1, \"%13\", tracker:coalesce(nmm:artistName(nmm:performer(?urn)), \"%11\")) AS ?author " +
+            "IF(COUNT(DISTINCT(tracker:coalesce(nmm:albumArtist(nmm:musicAlbum(?urn)), nmm:performer(?urn), 0))) > 1, \"%13\", tracker:coalesce(nmm:artistName(nmm:albumArtist(nmm:musicAlbum(?urn))), nmm:artistName(nmm:performer(?urn)), \"%11\")) AS ?author " +
             "COUNT(DISTINCT(?urn)) AS ?childcount "

 var albumsFromArtistSearchSelect = "SUM(IF(tracker:coalesce(tracker:id(nmm:performer(?urn)), 0) = %4, 1, 0)) AS ?filterout "
edit flag offensive delete publish link more

Comments

Thanks for this answer and the patch! I still hope jolla might fix this some day, maybe even sooon...

pvcn ( 2017-09-30 20:10:00 +0300 )edit
1

The modified query is not perfect yet. It will work fine for albums that have an album artist and those where the artist is the same for all songs. But it doesn't handle multi-artist albums without the albumArtist field correctly, instead just picking one song at random. Not a big deal, but still incorrect. I'll try to fix this, but any suggestions are welcome.

onitake ( 2017-10-01 00:22:51 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2014-01-22 14:04:57 +0300

Seen: 644 times

Last updated: Sep 29 '17