answered
2017-09-29 09:58:03 +0200
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 "
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 +0200 )editWith the hints from question 30984 I figured out that tracker ist emitting an album artwork file
for the artist name " " (single space) and symlinks for every track artist. For example Trainspotting results inand so on.
When entering the album overview
jolla-mediaplayer
stats (strace jolla-mediaplayer | grep fe51
) the non-existent artwork files(empty artist string) three times and
(I have no idea) one time.
lechris ( 2014-05-19 03:10:51 +0200 )edit... When entering the track overview of this album the individual artists get stat-ed as expected. For example
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 +0200 )editWhat 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 +0200 )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 +0200 )edit