[gnome-music/wip/carlosg/tracker3: 31/55] grltrackerwrapper: Retrieve creation year for songs
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/carlosg/tracker3: 31/55] grltrackerwrapper: Retrieve creation year for songs
- Date: Thu, 20 Aug 2020 14:39:32 +0000 (UTC)
commit 8461668b063ae75db68427306fb2f2e776935a5f
Author: Sumaid Syed <sumaidsyed gmail com>
Date: Wed Jul 29 12:03:58 2020 +0200
grltrackerwrapper: Retrieve creation year for songs
Based on the patches by Jean Felder.
https://gitlab.gnome.org/GNOME/gnome-music/issues/293
gnomemusic/grilowrappers/grltrackerwrapper.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 5788da44..d7859354 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -337,7 +337,7 @@ class GrlTrackerWrapper(GObject.GObject):
?type ?urn ?title ?id ?url
?artist ?album
?duration ?trackNumber
- ?albumDiscNumber
+ ?albumDiscNumber ?creationDate
nie:usageCounter(?urn) AS ?playCount
?tag AS ?favorite
WHERE {
@@ -355,8 +355,10 @@ class GrlTrackerWrapper(GObject.GObject):
nmm:trackNumber(?song) AS ?trackNumber
nmm:setNumber(nmm:musicAlbumDisc(?song))
AS ?albumDiscNumber
+ YEAR(?date) AS ?creationDate
WHERE {
?song a nmm:MusicPiece .
+ OPTIONAL { ?song nie:contentCreated ?date . }
FILTER ( ?song in ( %(media_ids)s ) )
%(location_filter)s
}
@@ -442,7 +444,7 @@ class GrlTrackerWrapper(GObject.GObject):
?type ?urn ?title ?id ?url
?artist ?album
?duration ?trackNumber
- ?albumDiscNumber
+ ?albumDiscNumber ?creationDate
nie:usageCounter(?urn) AS ?playCount
?tag AS ?favorite
WHERE {
@@ -460,8 +462,10 @@ class GrlTrackerWrapper(GObject.GObject):
nmm:trackNumber(?song) AS ?trackNumber
nmm:setNumber(nmm:musicAlbumDisc(?song))
AS ?albumDiscNumber
+ YEAR(?date) AS ?creationDate
WHERE {
?song a nmm:MusicPiece .
+ OPTIONAL { ?song nie:contentCreated ?date . }
%(location_filter)s
}
ORDER BY ?title
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]