[gnome-music] coregrilo: Update wrapper function calls
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] coregrilo: Update wrapper function calls
- Date: Sun, 5 Jul 2020 14:26:13 +0000 (UTC)
commit eb35c6e1ef0cff5e30c31e3e97e7b0cacb23da3d
Author: Chinmay Gurjar <chnmgurjar gmail com>
Date: Wed Jun 17 20:05:29 2020 +0530
coregrilo: Update wrapper function calls
With addition of support for more sources in Music(other than tracker),
the functions like get_artist_albums, get_album_discs and
populate_album_disc_songs have to be updated so that each source can
call its respective function.
gnomemusic/coregrilo.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index a7a4936e..33957878 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -160,17 +160,18 @@ class CoreGrilo(GObject.GObject):
# FIXME: Only removes search sources atm.
self._search_wrappers.pop(source.props.source_id, None)
- def get_artist_albums(self, artist, filter_model):
- for wrapper in self._wrappers.values():
- wrapper.get_artist_albums(artist, filter_model)
+ def get_artist_albums(self, media, filter_model):
+ source = media.get_source()
+ self._wrappers[source].get_artist_albums(media, filter_model)
def get_album_discs(self, media, disc_model):
- for wrapper in self._wrappers.values():
- wrapper.get_album_discs(media, disc_model)
+ source = media.get_source()
+ self._wrappers[source].get_album_discs(media, disc_model)
def populate_album_disc_songs(self, media, discnr, callback):
- for wrapper in self._wrappers.values():
- wrapper.populate_album_disc_songs(media, discnr, callback)
+ source = media.get_source()
+ self._wrappers[source].populate_album_disc_songs(
+ media, discnr, callback)
def writeback(self, media, key):
"""Store the values associated with the key.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]