[gnome-music/songeditor-tracker3: 4/32] grltrackerwrapper: Retrieve creation year for songs
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/songeditor-tracker3: 4/32] grltrackerwrapper: Retrieve creation year for songs
- Date: Mon, 25 May 2020 18:32:41 +0000 (UTC)
commit 467ab8620820626e90a8b176b2b5ba2718e564df
Author: Sumaid Syed <sumaidsyed gmail com>
Date: Sun Aug 4 22:47:34 2019 +0530
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 | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 11f6ddf2..ce44b72f 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -321,9 +321,11 @@ class GrlTrackerWrapper(GObject.GObject):
nie:usageCounter(?song) AS ?play_count
nmm:trackNumber(?song) AS ?track_number
nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
+ YEAR(?date) AS ?creation_date
?tag AS ?favourite
WHERE {
?song a nmm:MusicPiece .
+ OPTIONAL { ?song nie:contentCreated ?date . }
OPTIONAL {
?song nao:hasTag ?tag .
FILTER (?tag = nao:predefined-tag-favorite)
@@ -414,9 +416,11 @@ class GrlTrackerWrapper(GObject.GObject):
nie:usageCounter(?song) AS ?play_count
nmm:trackNumber(?song) AS ?track_number
nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
+ YEAR(?date) AS ?creation_date
?tag AS ?favourite
WHERE {
?song a nmm:MusicPiece .
+ OPTIONAL { ?song nie:contentCreated ?date . }
OPTIONAL {
?song nao:hasTag ?tag .
FILTER (?tag = nao:predefined-tag-favorite)
@@ -666,9 +670,11 @@ class GrlTrackerWrapper(GObject.GObject):
nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
?tag AS ?favourite
nie:usageCounter(?song) AS ?play_count
+ YEAR(?date) AS ?creation_date
WHERE {
?song a nmm:MusicPiece ;
nmm:musicAlbum ?album .
+ OPTIONAL { ?song nie:contentCreated ?date . }
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]