Commit 84bcbdb3 authored by Marinus Schraal's avatar Marinus Schraal

grilo: Remove redundant idle_add's

The Grilo call is async, so no need to schedule it.
parent f73f79ea
......@@ -237,20 +237,20 @@ class Grilo(GObject.GObject):
@log
def populate_artists(self, offset, callback, count=-1):
if self.tracker:
GLib.idle_add(self.populate_items, Query.all_artists(), offset,
callback, count)
self.populate_items(
Query.all_artists(), offset, callback, count)
@log
def populate_albums(self, offset, callback, count=-1):
if self.tracker:
GLib.idle_add(self.populate_items, Query.all_albums(), offset,
callback, count)
self.populate_items(
Query.all_albums(), offset, callback, count)
@log
def populate_songs(self, offset, callback, count=-1):
if self.tracker:
GLib.idle_add(self.populate_items, Query.all_songs(), offset,
callback, count)
self.populate_items(
Query.all_songs(), offset, callback, count)
@log
def populate_playlists(self, offset, callback, count=-1):
......@@ -261,9 +261,8 @@ class Grilo(GObject.GObject):
:param int count: limit number of results
"""
if self.tracker:
GLib.idle_add(
self.populate_items, Query.all_playlists(), offset, callback,
count)
self.populate_items(
Query.all_playlists(), offset, callback, count)
@log
def populate_user_playlists(self, offset, callback, count=-1):
......@@ -274,15 +273,14 @@ class Grilo(GObject.GObject):
:param int count: limit number of results
"""
if self.tracker:
GLib.idle_add(
self.populate_items, Query.all_user_playlists(), offset,
callback, count)
self.populate_items(
Query.all_user_playlists(), offset, callback, count)
@log
def populate_album_songs(self, album, callback, count=-1):
if album.get_source() == 'grl-tracker-source':
GLib.idle_add(self.populate_items,
Query.album_songs(album.get_id()), 0, callback, count)
self.populate_items(
Query.album_songs(album.get_id()), 0, callback, count)
else:
source = self.sources[album.get_source()]
length = len(album.songs)
......@@ -293,9 +291,8 @@ class Grilo(GObject.GObject):
@log
def populate_playlist_songs(self, playlist, callback, count=-1):
if self.tracker:
GLib.idle_add(self.populate_items,
Query.playlist_songs(playlist.get_id()), 0, callback,
count)
self.populate_items(
Query.playlist_songs(playlist.get_id()), 0, callback, count)
@log
def populate_custom_query(self, query, callback, count=-1, data=None):
......
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