summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <mschraal@gnome.org>2020-05-23 00:16:27 +0200
committerMarinus Schraal <mschraal@gnome.org>2020-05-25 11:32:37 +0200
commit91cbbc4ccadf171c474e5871e2c6ca366474b606 (patch)
tree21235aa2d6ec67e6e8a02cf2bc8f38c8c6fbc606
parent0b2a6677d5a9bb053f1bd58bbf7908700475a702 (diff)
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.
-rw-r--r--gnomemusic/grilowrappers/grltrackerwrapper.py3
1 files changed, 3 insertions, 0 deletions
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(