[gnome-music] query: do not return objects where tracker does not have FileDataObject information.
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] query: do not return objects where tracker does not have FileDataObject information.
- Date: Sun, 15 Sep 2013 13:16:56 +0000 (UTC)
commit f1380018a5549f285d2a6cad921a9421402f1cc9
Author: Dominique Leuenberger <dimstar opensuse org>
Date: Wed Sep 11 22:18:44 2013 +0200
query: do not return objects where tracker does not have FileDataObject information.
https://bugzilla.gnome.org/show_bug.cgi?id=707938
gnomemusic/query.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/query.py b/gnomemusic/query.py
index e40eb8a..b350e22 100644
--- a/gnomemusic/query.py
+++ b/gnomemusic/query.py
@@ -209,7 +209,8 @@ class Query():
nie:title(nmm:musicAlbum(?song)) AS album
nfo:duration(?song) AS duration
{
- ?song a nmm:MusicPiece
+ ?song a nmm:MusicPiece ;
+ a nfo:FileDataObject
}
ORDER BY tracker:added(?song)
'''.replace('\n', ' ').strip()
@@ -218,7 +219,8 @@ class Query():
SELECT
COUNT(?song) AS childcount
WHERE {
- ?song a nmm:MusicPiece
+ ?song a nmm:MusicPiece ;
+ a nfo:FileDataObject
}
'''.replace('\n', ' ').strip()
@@ -235,6 +237,7 @@ class Query():
nfo:duration(?song) AS duration
WHERE {
?song a nmm:MusicPiece ;
+ a nfo:FileDataObject ;
nmm:musicAlbum ?album .
FILTER (
tracker:id(?album) = %(album_id)s
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]