Commit 05d7b487 authored by Vadim Rutkovsky's avatar Vadim Rutkovsky

playlists: set update playlist update priority to low

parent a7213228
......@@ -142,18 +142,18 @@ class Playlists(GObject.GObject):
@log
def clear_playlist_with_id(self, playlist_id):
query = Query.clear_playlist_with_id(playlist_id)
self.tracker.update(query, GLib.PRIORITY_DEFAULT, None)
self.tracker.update(query, GLib.PRIORITY_LOW, None)
@log
def update_playcount(self, song_url):
query = Query.update_playcount(song_url)
self.tracker.update(query, GLib.PRIORITY_DEFAULT, None)
self.tracker.update(query, GLib.PRIORITY_LOW, None)
@log
def update_last_played(self, song_url):
cur_time = time.strftime(sparql_dateTime_format, time.gmtime())
query = Query.update_last_played(song_url, cur_time)
self.tracker.update(query, GLib.PRIORITY_DEFAULT, None)
self.tracker.update(query, GLib.PRIORITY_LOW, None)
@log
def update_static_playlist(self, playlist):
......@@ -173,7 +173,7 @@ class Playlists(GObject.GObject):
uri = cursor.get_string(0)[0]
final_query += Query.add_song_to_playlist(playlist.ID, uri)
self.tracker.update_blank_async(final_query, GLib.PRIORITY_DEFAULT,
self.tracker.update_blank_async(final_query, GLib.PRIORITY_LOW,
None, None, None)
# tell system we updated the playlist so playlist is reloaded
......@@ -189,10 +189,10 @@ class Playlists(GObject.GObject):
@log
def create_playlist_and_return_id(self, title, tag_text):
self.tracker.update_blank(Query.create_tag(tag_text), GLib.PRIORITY_DEFAULT, None)
self.tracker.update_blank(Query.create_tag(tag_text), GLib.PRIORITY_LOW, None)
data = self.tracker.update_blank(
Query.create_playlist_with_tag(title, tag_text), GLib.PRIORITY_DEFAULT,
Query.create_playlist_with_tag(title, tag_text), GLib.PRIORITY_LOW,
None)
playlist_urn = data.get_child_value(0).get_child_value(0).\
get_child_value(0).get_child_value(1).get_string()
......@@ -225,7 +225,7 @@ class Playlists(GObject.GObject):
)
self.tracker.update_blank_async(
Query.create_playlist(title), GLib.PRIORITY_DEFAULT,
Query.create_playlist(title), GLib.PRIORITY_LOW,
None, update_callback, None
)
......@@ -236,7 +236,7 @@ class Playlists(GObject.GObject):
self.emit('playlist-deleted', item)
self.tracker.update_async(
Query.delete_playlist(item.get_id()), GLib.PRIORITY_DEFAULT,
Query.delete_playlist(item.get_id()), GLib.PRIORITY_LOW,
None, update_callback, None
)
......@@ -268,7 +268,7 @@ class Playlists(GObject.GObject):
continue
self.tracker.update_blank_async(
Query.add_song_to_playlist(playlist.get_id(), uri),
GLib.PRIORITY_DEFAULT,
GLib.PRIORITY_LOW,
None, update_callback, None
)
......@@ -283,6 +283,6 @@ class Playlists(GObject.GObject):
Query.remove_song_from_playlist(
playlist.get_id(), item.get_id()
),
GLib.PRIORITY_DEFAULT,
GLib.PRIORITY_LOW,
None, update_callback, item
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment