From 91cbbc4ccadf171c474e5871e2c6ca366474b606 Mon Sep 17 00:00:00 2001 From: Marinus Schraal Date: Sat, 23 May 2020 00:16:27 +0200 Subject: grltrackerwrapper: Handle missing change notification case When Grilo notifies that a media has changed, either a property of the media has changed or it has been moved within Trackers indexed locations. Music likely only uses part of the Tracker indexed locations and so some changes are additions/removals from Musics perspective. The code that handles this only dealt with additions mistakenly, add a case for removal too. --- gnomemusic/grilowrappers/grltrackerwrapper.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py index ae2626a5..31d6d681 100644 --- a/gnomemusic/grilowrappers/grltrackerwrapper.py +++ b/gnomemusic/grilowrappers/grltrackerwrapper.py @@ -352,6 +352,7 @@ class GrlTrackerWrapper(GObject.GObject): return if not media: + self._remove_media(media_ids) return if media.get_id() not in self._hash: @@ -364,6 +365,8 @@ class GrlTrackerWrapper(GObject.GObject): else: self._hash[media.get_id()].update(media) + media_ids.remove(media.get_id()) + options = self._fast_options.copy() self.props.source.query( -- cgit v1.2.3