Move the qml/* files to the src folder. Now it is the main version
[mussorgsky] / src / qml / tracker_backend_gi.py
diff --git a/src/qml/tracker_backend_gi.py b/src/qml/tracker_backend_gi.py
deleted file mode 100644 (file)
index f5329a0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-import gi
-from gi.repository import Tracker
-
-# (album name, artist1|artist2|... , number of artists)
-ALBUM_ARTISTS_COUNTER = """
-SELECT nie:title (?album) nmm:artistName (?artist) COUNT (?artist)
-WHERE
-    {
-     ?album a nmm:MusicAlbum ; 
-            nmm:albumArtist ?artist .
-    }
-GROUP BY ?album
-"""
-
-class TrackerBackendGI:
-
-    def __init__ (self):
-        self.conn = Tracker.SparqlConnection.get (None)
-
-    def get_all_albums (self):
-        """
-        Generator returning (album_title, album_artist)
-        If the album has more than one artist, "Various artists"
-        """
-        cursor = self.conn.query (ALBUM_ARTISTS_COUNTER, None)
-        while cursor.next (None):
-            album_title = cursor.get_string (0)[0]
-            if cursor.get_integer(2) > 1:
-                album_artist = "Various artists"
-            else:
-                album_artist = cursor.get_string (1)[0]
-
-            yield (album_title, album_artist)
-            
-
-
-if __name__ == "__main__":
-
-    tracker = TrackerBackendGI()
-    tracker.get_all_albums ()