Cleaup next_track somewhat
This commit is contained in:
parent
f34507cc29
commit
c2d6f3ab89
@ -315,10 +315,12 @@ class BasePlaybackController(object):
|
|||||||
"""
|
"""
|
||||||
tracks = self.backend.current_playlist.playlist.tracks
|
tracks = self.backend.current_playlist.playlist.tracks
|
||||||
|
|
||||||
if self.current_track is None:
|
if not tracks:
|
||||||
if tracks:
|
|
||||||
return tracks[0]
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
if self.current_track is None:
|
||||||
|
return tracks[0]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return tracks[self.playlist_position + 1]
|
return tracks[self.playlist_position + 1]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user