[gnome-music] query: Order special playlist on top
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] query: Order special playlist on top
- Date: Tue, 10 May 2016 21:23:17 +0000 (UTC)
commit 132d30684bc299cabf35faccc417dc1cc7875b85
Author: Marinus Schraal <mschraal src gnome org>
Date: Thu Feb 4 14:09:54 2016 +0100
query: Order special playlist on top
Use the fact that the auto-generated playlists are tagged to sort them
on top of the list.
https://bugzilla.gnome.org/show_bug.cgi?id=761502
gnomemusic/query.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index 28db88a..ba7bc52 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -238,8 +238,9 @@ class Query():
tracker:available ?available . }
FILTER ( (STRSTARTS(?url, '%(music_dir)s/') && ?available)
|| !BOUND(nfo:belongsToContainer(?playlist)) )
+ OPTIONAL { ?playlist nao:hasTag ?tag }
}
- ORDER BY LCASE(?title)
+ ORDER BY !BOUND(?tag) LCASE(?title)
'''.replace('\n', ' ').strip() % {
'where_clause': where_clause.replace('\n', ' ').strip(),
'music_dir': Query.MUSIC_URI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]