[gnome-music/wip/jfelder/musicbrainz-tageditordialog: 27/31] query: Get additional tags from the Songs query



commit 919e48da8d8e976d42ca1a25062fcea7c3147271
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Aug 20 00:08:50 2018 +0200

    query: Get additional tags from the Songs query
    
    Retrieve composer, track_number, album_disc_number, genre and
    creation_date.

 gnomemusic/query.py | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 227c5f16..a1016b2d 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -196,11 +196,16 @@ class Query():
         ?url
         nie:title(?song) AS ?title
         nmm:artistName(nmm:performer(?song)) AS ?artist
+        nmm:artistName(nmm:composer(?song)) AS ?composer
+        nmm:trackNumber(?song) AS ?track_number
+        nmm:setNumber(nmm:musicAlbumDisc(?song)) AS ?album_disc_number
         nie:title(nmm:musicAlbum(?song)) AS ?album
         nfo:duration(?song) AS ?duration
+        nfo:genre(?song) AS ?genre
         ?tag AS ?favourite
         nie:contentAccessed(?song) AS ?last_played_time
         nie:usageCounter(?song) AS ?play_count
+        YEAR(nie:contentCreated(?song)) AS ?creation_date
     {
         %(where_clause)s
         ?song a nmm:MusicPiece ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]