[gnome-music/wip/mschraal/grltrackerwrapper-fix-artists-query-for-art-retrieval] grltrackerwrapper: Fix artist queries to retrieve art
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/grltrackerwrapper-fix-artists-query-for-art-retrieval] grltrackerwrapper: Fix artist queries to retrieve art
- Date: Wed, 21 Oct 2020 14:12:22 +0000 (UTC)
commit ea1e7360ef091b13daa3ef14083e43012f09f4b2
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Oct 21 16:00:54 2020 +0200
grltrackerwrapper: Fix artist queries to retrieve art
Artwork for artists was not retrieved anymore, this was due to the
artist field of the Grl.Media no longer be filled. This can be traced
back to bf973c1255, the initial porting of the Tracker artist queries to
Tracker 3.
In Music a distinction is not made between artist and albumartist tags.
The latter is always preferred, but might not be available. So, the
artist tag should always be considered filled. In this case however the
query was altered to only provide albumartist to the Grl.Media.
The art lookup resolve operations require the artist field of the
Grl.Media to be present, so they would return empty as the Grilo plugins
do not support albumartist.
Restore the previous behaviour of the queries.
gnomemusic/grilowrappers/grltrackerwrapper.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 96b19897..87189e3b 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -276,7 +276,7 @@ class GrlTrackerWrapper(GObject.GObject):
SELECT
%(media_type)s AS ?type
(COALESCE(?album_artist, ?artist) AS ?id)
- ?artist_bind AS ?albumArtist
+ ?artist_bind AS ?artist
WHERE {
?song a nmm:MusicPiece;
nmm:musicAlbum ?album;
@@ -599,14 +599,14 @@ class GrlTrackerWrapper(GObject.GObject):
artists_added.clear()
query = """
- SELECT ?type ?id ?albumArtist
+ SELECT ?type ?id ?artist
WHERE {
SERVICE <dbus:%(miner_fs_busname)s> {
GRAPH tracker:Audio {
SELECT
%(media_type)s AS ?type
(COALESCE(?album_artist, ?artist) AS ?id)
- ?artist_bind AS ?albumArtist
+ ?artist_bind AS ?artist
WHERE {
?song a nmm:MusicPiece;
nmm:musicAlbum ?album;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]