#1590·mopidy

Undefined behavior when removing currently playing track from tracklist.

Author: jcass77Created Jan 7, 2017Updated Apr 15, 2026
LabelsA-core

TracklistController.remove() currently just removes the track and triggers the tracklist_changed event:

https://github.com/mopidy/mopidy/blob/2b7f12b8542d04190a85ed890edac1ce9192d9e8/mopidy/core/tracklist.py#L567-L572

I'm not sure that it makes sense to keep playing the current track if it was just removed from the tracklist - perhaps it would be better to call stop() or next() at that point instead?

https://github.com/mopidy/mopidy/blob/2b7f12b8542d04190a85ed890edac1ce9192d9e8/mopidy/core/playback.py#L304-L305