PlaylistPanel: implement playing of selected album
This commit is contained in:
parent
950bd54804
commit
b88f1c6e0b
2 changed files with 25 additions and 1 deletions
|
|
@ -201,6 +201,12 @@ class Client(Base):
|
|||
self._add_action(self._remove_album_from_playlist, album)
|
||||
|
||||
|
||||
def play_album_from_playlist(self, album):
|
||||
"""Play the given album from the playlist."""
|
||||
self._logger.info("play album from playlist")
|
||||
self._add_action(self._play_album_from_playlist, album)
|
||||
|
||||
|
||||
def playpause(self):
|
||||
"""Play or pauses the current state."""
|
||||
self._logger.info("playpause")
|
||||
|
|
@ -456,6 +462,11 @@ class Client(Base):
|
|||
self._call('command_list_end')
|
||||
|
||||
|
||||
def _play_album_from_playlist(self, album):
|
||||
if album.get_tracks():
|
||||
self._call('playid', album.get_tracks()[0].get_id())
|
||||
|
||||
|
||||
def _playpause(self):
|
||||
"""Action: Perform the real play/pause command."""
|
||||
#status = self._parse_dict(self._call('status'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue