[gnome-music/wip/mschraal/assorted-cleanups: 24/34] grltrackerwrapper: Cleanup init arguments
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/assorted-cleanups: 24/34] grltrackerwrapper: Cleanup init arguments
- Date: Sat, 28 Mar 2020 22:15:04 +0000 (UTC)
commit 1cb0c104440f3509cb9b4ddf7fe97964179b0128
Author: Marinus Schraal <mschraal gnome org>
Date: Thu Mar 26 14:02:47 2020 +0100
grltrackerwrapper: Cleanup init arguments
gnomemusic/coregrilo.py | 3 +--
gnomemusic/grilowrappers/grltrackerwrapper.py | 8 ++------
2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gnomemusic/coregrilo.py b/gnomemusic/coregrilo.py
index 9aaf661c..ed66c6b9 100644
--- a/gnomemusic/coregrilo.py
+++ b/gnomemusic/coregrilo.py
@@ -132,8 +132,7 @@ class CoreGrilo(GObject.GObject):
and new_state == TrackerState.AVAILABLE):
if source.props.source_id not in self._wrappers.keys():
new_wrapper = GrlTrackerWrapper(
- source, self._coremodel, self._application, self,
- self._tracker_wrapper)
+ source, self._application, self._tracker_wrapper)
self._wrappers[source.props.source_id] = new_wrapper
self._log.debug("Adding wrapper {}".format(new_wrapper))
else:
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 3ab56564..f31aeb1e 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -61,21 +61,17 @@ class GrlTrackerWrapper(GObject.GObject):
Grl.METADATA_KEY_THUMBNAIL,
]
- def __init__(
- self, source, coremodel, application, grilo, tracker_wrapper):
+ def __init__(self, source, application, tracker_wrapper):
"""Initialize the Tracker wrapper
:param Grl.TrackerSource source: The Tracker source to wrap
- :param CoreModel coremodel: CoreModel instance to use models
- from
:param Application application: Application instance
- :param CoreGrilo grilo: The CoreGrilo instance
:param TrackerWrapper tracker_wrapper: The TrackerWrapper instance
"""
super().__init__()
self._application = application
- self._coremodel = coremodel
+ self._coremodel = application.props.coremodel
self._log = application.props.log
self._songs_model = self._coremodel.props.songs
self._source = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]