[gnome-music/wip/mschraal/player-no-play-empty-playlist: 3/3] player: Minor Player play function cleanups
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/player-no-play-empty-playlist: 3/3] player: Minor Player play function cleanups
- Date: Sat, 4 Jan 2020 22:58:24 +0000 (UTC)
commit 480a78ac7c7d57448ceef6021629d0689e689e77
Author: Marinus Schraal <mschraal gnome org>
Date: Sat Jan 4 23:23:20 2020 +0100
player: Minor Player play function cleanups
* Update outdated docstring
* Remove @log decorator
gnomemusic/player.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 9c645db3..f91fdefb 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -487,14 +487,16 @@ class Player(GObject.GObject):
self._time_stamp = int(time.time())
self._gst_player.props.url = coresong.props.url
- @log
def play(self, coresong=None):
"""Play a song.
- Load a new song or resume playback depending on song_changed
- value. If song_offset is defined, set a new song and play it.
+ Start playing a song, a specific CoreSong if supplied and
+ available or a song in the playlist decided by the play mode.
+
+ If a song is paused, a subsequent play call without a CoreSong
+ supplied will continue playing the paused song.
- :param bool song_changed: indicate if a new song must be loaded
+ :param CoreSong coresong: The CoreSong to play or None.
"""
if self.props.current_song is None:
coresong = self._playlist.set_song(coresong)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]