Merge branch 'master' into 'master'
Add check for whether to queue the currently playing album (close #78) Closes #78 See merge request coderkun/mcg!1
This commit is contained in:
commit
9de629bfed
1 changed files with 4 additions and 0 deletions
|
|
@ -611,6 +611,10 @@ class Client(Base):
|
||||||
|
|
||||||
def _queue_album(self, album):
|
def _queue_album(self, album):
|
||||||
track_ids = []
|
track_ids = []
|
||||||
|
# check whether the album to queue is already the last in the playlist
|
||||||
|
if self._playlist and self._playlist[-1] == self._albums[album]:
|
||||||
|
# return the first song in the album
|
||||||
|
return [self._playlist[-1].get_tracks()[0].get_id()]
|
||||||
if album in self._albums:
|
if album in self._albums:
|
||||||
self._logger.info("add album %s", album)
|
self._logger.info("add album %s", album)
|
||||||
for track in self._albums[album].get_tracks():
|
for track in self._albums[album].get_tracks():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue