player: removing last playlist entry while looping should not stop

Run "playlist-remove current" while the last playlist entry is being
played stopped playback. Fix this and return to the first entry instead.

Fixes #3808.
This commit is contained in:
wm4 2016-11-18 13:46:34 +01:00
parent c4d6fcbb02
commit 5a011c5c06
1 changed files with 1 additions and 1 deletions

View File

@ -5157,7 +5157,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
return -1;
// Can't play a removed entry
if (mpctx->playlist->current == e && !mpctx->stop_play)
mpctx->stop_play = PT_CURRENT_ENTRY;
mpctx->stop_play = PT_NEXT_ENTRY;
playlist_remove(mpctx->playlist, e);
mp_notify(mpctx, MP_EVENT_CHANGE_PLAYLIST, NULL);
mp_wakeup_core(mpctx);