[gnome-music/wip/mschraal/set-player-model-cleanups: 5/5] coremodel: Add set_player_model docstring



commit 84103501281956bade403fee8cd7f1dba563f3bb
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Nov 3 16:44:22 2019 +0100

    coremodel: Add set_player_model docstring

 gnomemusic/coremodel.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index dc549722..13a8bc0e 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -224,6 +224,15 @@ class CoreModel(GObject.GObject):
         return albums_model_sort
 
     def set_player_model(self, playlist_type, model):
+        """Set the model for PlayerPlaylist to use
+
+        This fills playlist model based on the playlist type and model
+        given. This builds a separate model to stay alive and play
+        while the user navigates other views.
+
+        :param PlaylistType playlist_type: The type of the playlist
+        :param Gio.ListStore model: The base model for the player model
+        """
         if model is self._previous_playlist_model:
             for song in self._playlist_model:
                 if song.props.state == SongWidget.State.PLAYING:


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