Fix BasePlaybackController with respect to test_next_track_before_play
This commit is contained in:
parent
824f464146
commit
50085d5db5
@ -312,11 +312,14 @@ class BasePlaybackController(object):
|
||||
enabled this should be a random track, all tracks should be played once
|
||||
before the list repeats.
|
||||
"""
|
||||
tracks = self.backend.current_playlist.playlist.tracks
|
||||
|
||||
if self.current_track is None:
|
||||
if tracks:
|
||||
return tracks[0]
|
||||
return None
|
||||
try:
|
||||
return self.backend.current_playlist.playlist.tracks[
|
||||
self.playlist_position + 1]
|
||||
return tracks[self.playlist_position + 1]
|
||||
except IndexError:
|
||||
return None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user