[gnome-music] When selecting album songs, sort them by track number



commit 53db4f95bdc988aea60d4d6d524f1617795cd1ab
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Thu Apr 4 14:04:07 2013 +0200

    When selecting album songs, sort them by track number

 src/query.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index b132baf..be0ffb7 100644
--- a/src/query.js
+++ b/src/query.js
@@ -28,6 +28,6 @@ const songs = 'SELECT DISTINCT rdf:type(?song) tracker:id(?song) as id nie:url(?
 const songs_count = 'SELECT COUNT(?song) AS childcount WHERE { ?song a nmm:MusicPiece }';
 
 function album_songs (album_id) {
-    var query = "SELECT rdf:type(?song) tracker:id(?song) as id nie:url(?song) as url nie:title(?song) as 
title nmm:artistName(nmm:performer(?song)) as artist nie:title(nmm:musicAlbum(?song)) as album 
nfo:duration(?song) as duration WHERE { ?song a nmm:MusicPiece ; nmm:musicAlbum ?album . filter 
(tracker:id(?album) ="+ album_id +") } ORDER BY tracker:added(?song)";
+    var query = "SELECT DISTINCT rdf:type(?song) tracker:id(?song) as id nie:url(?song) as url 
nie:title(?song) as title nmm:artistName(nmm:performer(?song)) as artist nie:title(nmm:musicAlbum(?song)) as 
album nfo:duration(?song) as duration WHERE { ?song a nmm:MusicPiece ; nmm:musicAlbum ?album . filter 
(tracker:id(?album) ="+ album_id +") } ORDER BY nmm:trackNumber(?song) tracker:added(?song)";
     return query;
 }


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