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



commit adce9a9b2ce877affbe6c7c8e0301e1d015801ca
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 b8223bc8..c9ee428e 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -194,10 +194,15 @@ 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: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]