[gnome-music/wip/jfelder/tracker3-rebased: 22/46] grltrackerwrapper: Retrieve creation year for songs
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/tracker3-rebased: 22/46] grltrackerwrapper: Retrieve creation year for songs
- Date: Sun, 2 Aug 2020 07:44:50 +0000 (UTC)
commit 37abc0f2c8eb1bf7f01ae162a201d90f3c05f0e8
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 2e71d18b..a6549ca3 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]