[gnome-music/wip/mschraal/tageditor-13feb2020: 38/53] grltrackerwrapper: Retrieve album artist for songs
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/tageditor-13feb2020: 38/53] grltrackerwrapper: Retrieve album artist for songs
- Date: Wed, 26 Feb 2020 15:14:46 +0000 (UTC)
commit f6aa4721f73865730d2aec8961058b7817e61714
Author: Jean Felder <jfelder src gnome org>
Date: Wed Jan 22 18:06:24 2020 +0100
grltrackerwrapper: Retrieve album artist for songs
gnomemusic/grilowrappers/grltrackerwrapper.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 1e87e3fe..734a3ef2 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -326,6 +326,7 @@ class GrlTrackerWrapper(GObject.GObject):
nie:title(?song) AS ?title
nmm:artistName(nmm:performer(?song)) AS ?artist
nie:title(nmm:musicAlbum(?song)) AS ?album
+ ?album_artist AS ?album_artist
nfo:duration(?song) AS ?duration
nie:usageCounter(?song) AS ?play_count
nmm:trackNumber(?song) AS ?track_number
@@ -345,6 +346,10 @@ class GrlTrackerWrapper(GObject.GObject):
?track_id tracker:referenceSource
"https://musicbrainz.org/doc/Track" .
}
+ OPTIONAL {
+ ?song nmm:musicAlbum ?album .
+ ?album nmm:albumArtist/nmm:artistName ?album_artist .
+ }
OPTIONAL {
?song nao:hasTag ?tag .
FILTER (?tag = nao:predefined-tag-favorite)
@@ -420,6 +425,7 @@ class GrlTrackerWrapper(GObject.GObject):
nie:title(?song) AS ?title
nmm:artistName(nmm:performer(?song)) AS ?artist
nie:title(nmm:musicAlbum(?song)) AS ?album
+ ?album_artist AS ?album_artist
nfo:duration(?song) AS ?duration
nie:usageCounter(?song) AS ?play_count
nmm:trackNumber(?song) AS ?track_number
@@ -439,6 +445,10 @@ class GrlTrackerWrapper(GObject.GObject):
?track_id tracker:referenceSource
"https://musicbrainz.org/doc/Track" .
}
+ OPTIONAL {
+ ?song nmm:musicAlbum ?album .
+ ?album nmm:albumArtist/nmm:artistName ?album_artist .
+ }
OPTIONAL {
?song nao:hasTag ?tag .
FILTER (?tag = nao:predefined-tag-favorite)
@@ -686,6 +696,7 @@ class GrlTrackerWrapper(GObject.GObject):
nie:title(?song) AS ?title
nmm:artistName(nmm:performer(?song)) AS ?artist
nie:title(nmm:musicAlbum(?song)) AS ?album
+ ?album_artist AS ?album_artist
nfo:duration(?song) AS ?duration
nmm:trackNumber(?song) AS ?track_number
nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
@@ -706,6 +717,7 @@ class GrlTrackerWrapper(GObject.GObject):
?track_id tracker:referenceSource
"https://musicbrainz.org/doc/Track" .
}
+ OPTIONAL { ?album nmm:albumArtist/nmm:artistName ?album_artist . }
OPTIONAL { ?song nao:hasTag ?tag .
FILTER (?tag = nao:predefined-tag-favorite) } .
FILTER ( tracker:id(?album) = %(album_id)s
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]