[gnome-music/wip/mschraal/core: 114/164] artistsview: Remove some cruft



commit d783be37aa146070fc099695d29074bb82dfcab2
Author: Marinus Schraal <mschraal gnome org>
Date:   Mon Jun 24 01:50:09 2019 +0200

    artistsview: Remove some cruft

 gnomemusic/views/artistsview.py          | 5 +----
 gnomemusic/widgets/artistalbumswidget.py | 9 ++++-----
 2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gnomemusic/views/artistsview.py b/gnomemusic/views/artistsview.py
index f9fcf00a..25d67a74 100644
--- a/gnomemusic/views/artistsview.py
+++ b/gnomemusic/views/artistsview.py
@@ -118,16 +118,13 @@ class ArtistsView(BaseView):
 
         # Prepare a new artist_albums_widget here
         coreartist = row.props.artist
-        model = coreartist.props.model
 
         new_artist_albums_widget = Gtk.Frame(
             shadow_type=Gtk.ShadowType.NONE, hexpand=True)
         self._view.add(new_artist_albums_widget)
 
-        albums = self._window._app._coremodel.get_artist_albums(
-            coreartist.props.media)
         artist_albums = ArtistAlbumsWidget(
-            coreartist, albums, self.player, self._window, False, model)
+            coreartist, self.player, self._window, False)
         new_artist_albums_widget.add(artist_albums)
         new_artist_albums_widget.show()
 
diff --git a/gnomemusic/widgets/artistalbumswidget.py b/gnomemusic/widgets/artistalbumswidget.py
index 90ff8df1..f5fc28e6 100644
--- a/gnomemusic/widgets/artistalbumswidget.py
+++ b/gnomemusic/widgets/artistalbumswidget.py
@@ -55,14 +55,13 @@ class ArtistAlbumsWidget(Gtk.Box):
 
     @log
     def __init__(
-            self, coreartist, albums, player, window,
-            selection_mode_allowed=False, model=None):
+            self, coreartist, player, window, selection_mode_allowed=False):
         super().__init__(orientation=Gtk.Orientation.VERTICAL)
-        self._model = model
-        self._player = player
         self._artist = coreartist.props.artist
-        self._window = window
+        self._model = coreartist.props.model
+        self._player = player
         self._selection_mode_allowed = selection_mode_allowed
+        self._window = window
 
         self._artist_label.props.label = self._artist
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]