From 67044cecabe326146377955cd6126fbbb345080a Mon Sep 17 00:00:00 2001 From: Jens Luetjen Date: Thu, 31 Mar 2016 22:07:53 +0200 Subject: [PATCH] Remove 'TODO: check if playable' We don't need to as each backend a title is still playable. The backend must be able to handle unplayable title. Replace for loop with arrar.extend() --- mopidy/core/tracklist.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index c6dbda6a..bff0190e 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -667,13 +667,7 @@ class TracklistController(object): self.set_repeat(state.repeat) self.set_single(state.single) if 'tracklist' in coverage: - if state.next_tlid > self._next_tlid: - self._next_tlid = state.next_tlid + self._next_tlid = max(state.next_tlid, self._next_tlid) self._tl_tracks = [] - for track in state.tl_tracks: - # TODO: check if any backend will play the track. - # Could be an issue with music streaming services - # (login), disabled extensions and automatically - # generated playlists (pandora). - self._tl_tracks.append(track) + self._tl_tracks.extend(state.tl_tracks) self._increase_version()