[gnome-music/wip/jfelder/tracker3: 6/9] trackerwrapper: Adapt to Tracker 3 update API change




commit 582c3ad34990aba42108a61738b4d0141bd43027
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Jun 27 11:20:58 2020 +0200

    trackerwrapper: Adapt to Tracker 3 update API change
    
    Those functions no longer have a priority argument.

 gnomemusic/grilowrappers/grltrackerplaylists.py | 17 ++++++-----------
 gnomemusic/trackerwrapper.py                    |  9 +++------
 2 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index 61ba74c2..d67e39a7 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -202,8 +202,7 @@ class GrlTrackerPlaylists(GObject.GObject):
         """.replace("\n", " ").strip() % {
             "playlist_id": playlist.props.pl_id
         }
-        self._tracker.update_async(
-            query, GLib.PRIORITY_LOW, None, _delete_cb, None)
+        self._tracker.update_async(query, None, _delete_cb, None)
 
     def create_playlist(self, playlist_title, callback):
         """Creates a new user playlist.
@@ -244,8 +243,7 @@ class GrlTrackerPlaylists(GObject.GObject):
                              nfo:entryCounter 0 .
             }
             """.replace("\n", " ").strip() % {"title": playlist_title}
-        self._tracker.update_blank_async(
-            query, GLib.PRIORITY_LOW, None, _create_cb, None)
+        self._tracker.update_blank_async(query, None, _create_cb, None)
 
     def check_smart_playlist_change(self):
         """Check if smart playlists need to be updated.
@@ -490,8 +488,7 @@ class Playlist(GObject.GObject):
         }
 
         self.freeze_notify()
-        self._tracker.update_async(
-            query, GLib.PRIORITY_LOW, None, update_cb, None)
+        self._tracker.update_async(query, None, update_cb, None)
 
     def stage_song_deletion(self, coresong, index):
         """Adds a song to the list of songs to delete
@@ -587,8 +584,7 @@ class Playlist(GObject.GObject):
             "song_id": coresong.props.media.get_id()
         }
 
-        self._tracker.update_async(
-            query, GLib.PRIORITY_LOW, None, update_cb, None)
+        self._tracker.update_async(query, None, update_cb, None)
 
     def add_songs(self, coresongs):
         """Adds songs to the playlist
@@ -688,7 +684,7 @@ class Playlist(GObject.GObject):
                 "song_uri": coresong.props.media.get_url()}
 
             self._tracker.update_blank_async(
-                query, GLib.PRIORITY_LOW, None, _requery_media, coresong)
+                query, None, _requery_media, coresong)
 
     def reorder(self, previous_position, new_position):
         """Changes the order of a songs in the playlist.
@@ -731,8 +727,7 @@ class Playlist(GObject.GObject):
                 "position": position
             }
             self._tracker.update_async(
-                query, GLib.PRIORITY_LOW, None, _position_changed_cb,
-                position)
+                query, None, _position_changed_cb, position)
 
 
 class SmartPlaylist(Playlist):
diff --git a/gnomemusic/trackerwrapper.py b/gnomemusic/trackerwrapper.py
index 6c3d4fa9..c252039e 100644
--- a/gnomemusic/trackerwrapper.py
+++ b/gnomemusic/trackerwrapper.py
@@ -156,8 +156,7 @@ class TrackerWrapper(GObject.GObject):
                 self._log.warning("Unable to update favorite: {}".format(
                     e.message))
 
-        self._tracker.update_async(
-            update, GLib.PRIORITY_LOW, None, _update_favorite_cb)
+        self._tracker.update_async(update, None, _update_favorite_cb)
 
     def _update_play_count(self, media):
         update = """
@@ -180,8 +179,7 @@ class TrackerWrapper(GObject.GObject):
                 self._log.warning("Unable to update play count: {}".format(
                     e.message))
 
-        self._tracker.update_async(
-            update, GLib.PRIORITY_LOW, None, _update_play_count_cb)
+        self._tracker.update_async(update, None, _update_play_count_cb)
 
     def _update_last_played(self, media):
         last_played = media.get_last_played().format_iso8601()
@@ -205,8 +203,7 @@ class TrackerWrapper(GObject.GObject):
                 self._log.warning("Unable to update play count: {}".format(
                     e.message))
 
-        self._tracker.update_async(
-            update, GLib.PRIORITY_LOW, None, _update_last_played_cb)
+        self._tracker.update_async(update, None, _update_last_played_cb)
 
     def update_tag(self, media, tag):
         """Update property of a resource.


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