[gnome-music/wip/mschraal/tageditor-13feb2020: 35/53] grltrackerwrapper: Retrieve creation year for songs
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/tageditor-13feb2020: 35/53] grltrackerwrapper: Retrieve creation year for songs
- Date: Wed, 26 Feb 2020 15:14:30 +0000 (UTC)
commit 35a8d6a7d313afb749f85cf2570bdaea1db6703a
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 fb3568a4..8ac1662f 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -326,9 +326,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)
@@ -406,9 +408,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)
@@ -659,9 +663,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]