Fix BaseCurrentPlaylistController with respect to test_removing_from_empty_playlist
(cherry picked from commit e82a15ee9c)
This commit is contained in:
parent
d18e19d094
commit
7df5985abf
@ -156,6 +156,10 @@ class BaseCurrentPlaylistController(object):
|
||||
:type track: :class:`mopidy.models.Track`
|
||||
"""
|
||||
tracks = self.playlist.tracks
|
||||
|
||||
if track not in tracks:
|
||||
return
|
||||
|
||||
position = tracks.index(track)
|
||||
del tracks[position]
|
||||
self.playlist = self.playlist.with_(tracks=tracks)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user