[gnome-music/wip/mschraal/core] coremodel: Remove unused argument in set_playlist



commit bce04e4a1af3d27d79301d8f0c1dbabd1b9888cd
Author: Marinus Schraal <mschraal gnome org>
Date:   Mon Jul 1 23:00:35 2019 +0200

    coremodel: Remove unused argument in set_playlist

 gnomemusic/coremodel.py                  | 2 +-
 gnomemusic/views/searchview.py           | 2 +-
 gnomemusic/views/songsview.py            | 2 +-
 gnomemusic/widgets/albumwidget.py        | 3 +--
 gnomemusic/widgets/artistalbumswidget.py | 3 +--
 5 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index 7bd5a0fb..0abda1bf 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -128,7 +128,7 @@ class CoreModel(GObject.GObject):
     def get_playlist_model(self):
         return self._playlist_model_sort
 
-    def set_playlist_model(self, playlist_type, album_media, coresong, model):
+    def set_playlist_model(self, playlist_type, coresong, model):
         with model.freeze_notify():
 
             if playlist_type == PlayerPlaylist.Type.ALBUM:
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index 675d0173..9e1de8ce 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -186,7 +186,7 @@ class SearchView(BaseView):
             # self.emit('song-activated', widget)
 
             self._coremodel.set_playlist_model(
-                PlayerPlaylist.Type.SEARCH_RESULT, None, widget.props.coresong,
+                PlayerPlaylist.Type.SEARCH_RESULT, widget.props.coresong,
                 self._model)
             self.player.play()
 
diff --git a/gnomemusic/views/songsview.py b/gnomemusic/views/songsview.py
index 455ebe32..89f07cfb 100644
--- a/gnomemusic/views/songsview.py
+++ b/gnomemusic/views/songsview.py
@@ -211,7 +211,7 @@ class SongsView(BaseView):
         itr = self._view.props.model.get_iter(path)
         coresong = self._view.props.model[itr][5]
         self._window._app._coremodel.set_playlist_model(
-            PlayerPlaylist.Type.SONGS, None, coresong, self._view.props.model)
+            PlayerPlaylist.Type.SONGS, coresong, self._view.props.model)
         self.player.play()
 
     @log
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 9f7db434..7960d44c 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -153,8 +153,7 @@ class AlbumWidget(Gtk.EventBox):
         signal_id = self._parent_view._window._app._coremodel.connect(
             "playlist-loaded", _on_playlist_loaded)
         self._parent_view._window._app._coremodel.set_playlist_model(
-            PlayerPlaylist.Type.ALBUM, self._album, song_widget._media,
-            self._album_model)
+            PlayerPlaylist.Type.ALBUM, song_widget._media, self._album_model)
 
         return True
 
diff --git a/gnomemusic/widgets/artistalbumswidget.py b/gnomemusic/widgets/artistalbumswidget.py
index 31510477..5829bd0a 100644
--- a/gnomemusic/widgets/artistalbumswidget.py
+++ b/gnomemusic/widgets/artistalbumswidget.py
@@ -111,8 +111,7 @@ class ArtistAlbumsWidget(Gtk.Box):
         signal_id = self._player._app._coremodel.connect(
             "playlist-loaded", _on_playlist_loaded)
         self._player._app._coremodel.set_playlist_model(
-            PlayerPlaylist.Type.ARTIST, self._album, song_widget._media,
-            self._model)
+            PlayerPlaylist.Type.ARTIST, song_widget._media, self._model)
 
     def _add_album(self, corealbum):
         widget = ArtistAlbumWidget(


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