Fix BaseCurrentPlaylistController with respect to test_removing_from_empty_playlist
This commit is contained in:
parent
e9da4f53d4
commit
e82a15ee9c
@ -153,6 +153,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