[gnome-music/wip/mschraal/core: 163/208] grltrackersource: Minor cleanups



commit 97b796ede62d3ccd90f54a570d5fe6f94c0fabf5
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Jun 30 01:27:42 2019 +0200

    grltrackersource: Minor cleanups

 gnomemusic/grilowrappers/grltrackersource.py | 17 -----------------
 1 file changed, 17 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackersource.py b/gnomemusic/grilowrappers/grltrackersource.py
index c1b960af..51b88285 100644
--- a/gnomemusic/grilowrappers/grltrackersource.py
+++ b/gnomemusic/grilowrappers/grltrackersource.py
@@ -46,16 +46,10 @@ class GrlTrackerSource(GObject.GObject):
         self._artists_model = artists_model
         self._hash = {}
 
-        Grl.init(None)
-
         self._fast_options = Grl.OperationOptions()
         self._fast_options.set_resolution_flags(
             Grl.ResolutionFlags.FAST_ONLY | Grl.ResolutionFlags.IDLE_RELAY)
 
-        self._full_options = Grl.OperationOptions()
-        self._full_options.set_resolution_flags(
-            Grl.ResolutionFlags.FULL | Grl.ResolutionFlags.IDLE_RELAY)
-
         self._initial_fill(self._source)
         self._initial_albums_fill(self._source)
         self._initial_artists_fill(self._source)
@@ -80,7 +74,6 @@ class GrlTrackerSource(GObject.GObject):
                 print("REMOVED", media.get_id())
                 self._remove_media(media)
                 self._check_album_change(media)
-                # self.emit("media-removed", media)
 
     def _check_album_change(self, media):
         album_ids = {}
@@ -147,12 +140,6 @@ class GrlTrackerSource(GObject.GObject):
                     coresong.props.title)
                 self._model.remove(idx)
                 break
-        # for idx, coresong in enumerate(self._model):
-        #     print(coresong.props.title)
-        #     if coresong.props.url == removed_url:
-        #         print("remove ", removed_url)
-        #         self._model.remove(idx)
-        #         self._hash.pop(coresong.media.get_id(), 0)
 
     def _requery_media(self, grilo_id, only_update=False):
         query = """
@@ -214,7 +201,6 @@ class GrlTrackerSource(GObject.GObject):
             return
 
         if not media:
-            # print("NO MEDIA", source, op_id, media, error)
             return
 
         # FIXME: Figure out why we get double additions.
@@ -267,15 +253,12 @@ class GrlTrackerSource(GObject.GObject):
             return
 
         if not media:
-            # print("NO MEDIA", source, op_id, media, error)
             return
 
         song = CoreSong(media, self._core_selection, self._grilo)
         self._model.append(song)
         self._hash[media.get_id()] = song
 
-        # self._url_table[media.get_url()] = song
-
     def _initial_albums_fill(self, source):
         query = """
         SELECT


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