[gnome-music/wip/mschraal/tracker-change-tracking-fix: 7/7] coredisc: Remove changed items tracking in CoreDisc



commit be1d457f6cb7cddbc1bea6c0475cba8833cf7005
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 17 13:29:51 2019 +0200

    coredisc: Remove changed items tracking in CoreDisc
    
    Tracking the items-changed signal on the songs model in every CoreDisc
    instance is too slow and not the right approach for update tracking.

 gnomemusic/coredisc.py | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/gnomemusic/coredisc.py b/gnomemusic/coredisc.py
index ea4939ad..a7def610 100644
--- a/gnomemusic/coredisc.py
+++ b/gnomemusic/coredisc.py
@@ -57,8 +57,6 @@ class CoreDisc(GObject.GObject):
             self._model.set_sort_func(
                 self._wrap_sort_func(self._disc_sort))
 
-            self._coremodel.props.songs.connect(
-                "items-changed", self._on_core_changed)
             self._model.connect("items-changed", self._on_disc_changed)
 
             self._get_album_disc(
@@ -66,10 +64,6 @@ class CoreDisc(GObject.GObject):
 
         return self._model
 
-    def _on_core_changed(self, model, position, removed, added):
-        self._get_album_disc(
-            self.props.media, self.props.disc_nr, self._filter_model)
-
     def _on_disc_changed(self, model, position, removed, added):
         with self.freeze_notify():
             duration = 0


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