[gnome-music/wip/mschraal/assorted-cleanups: 15/30] corealbum: Pass Application to init
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/assorted-cleanups: 15/30] corealbum: Pass Application to init
- Date: Tue, 31 Mar 2020 13:14:10 +0000 (UTC)
commit 6a824864430394958e130994dbbd5f07a583c94f
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Mar 26 11:50:27 2020 +0100
corealbum: Pass Application to init
gnomemusic/corealbum.py | 6 +++---
gnomemusic/grilowrappers/grltrackerwrapper.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/corealbum.py b/gnomemusic/corealbum.py
index f58ca51e..325526d8 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -41,15 +41,15 @@ class CoreAlbum(GObject.GObject):
url = GObject.Property(type=str)
year = GObject.Property(type=str, default="----")
- def __init__(self, media, coremodel):
+ def __init__(self, application, media):
"""Initiate the CoreAlbum object
+ :param Application application: The application object
:param Grl.Media media: A media object
- :param CoreModel coremodel: The CoreModel to use models from
"""
super().__init__()
- self._coremodel = coremodel
+ self._coremodel = application.props.coremodel
self._model = None
self._selected = False
self.update(media)
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 786d2d9e..e16d73c9 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -221,7 +221,7 @@ class GrlTrackerWrapper(GObject.GObject):
if media.get_id() in self._album_ids.keys():
album = self._album_ids[media.get_id()]
else:
- album = CoreAlbum(media, self._coremodel)
+ album = CoreAlbum(self._application, media)
album_ids[media.get_id()] = album
@@ -448,7 +448,7 @@ class GrlTrackerWrapper(GObject.GObject):
self._window.notifications_popup.pop_loading()
return
- album = CoreAlbum(media, self._coremodel)
+ album = CoreAlbum(self._application, media)
self._album_ids[media.get_id()] = album
albums_added.append(album)
if len(albums_added) == self._SPLICE_SIZE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]