Playlist Controller: Stop when deleting current
When deleting the currently playing track, stop playback, because the player engine doesn't like dealing with the current playing track not actually having a playlist reference to go with it. Better stop playback instead, as a safety check. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
39cc33cac4
commit
6d9f1be7ea
|
@ -606,6 +606,11 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
|||
for (PlaylistEntry *pe in objects) {
|
||||
[unarrangedIndexes addIndex:[pe index]];
|
||||
}
|
||||
|
||||
if ([indexes containsIndex:currentEntry.index]) {
|
||||
// Safety check. The player doesn't like committing actions on a removed track
|
||||
[playbackController stop:nil];
|
||||
}
|
||||
|
||||
if (currentEntry.index >= 0 && [unarrangedIndexes containsIndex:currentEntry.index]) {
|
||||
currentEntry.index = -currentEntry.index - 1;
|
||||
|
|
Loading…
Reference in New Issue