mirror of
https://github.com/mpv-player/mpv
synced 2024-12-15 11:25:10 +00:00
player: minor simplification
This commit is contained in:
parent
ad541c26f7
commit
4758866a18
@ -3836,7 +3836,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
}
|
||||
|
||||
case MP_CMD_STOP:
|
||||
// Go back to the starting point.
|
||||
playlist_clear(mpctx->playlist);
|
||||
mpctx->stop_play = PT_STOP;
|
||||
break;
|
||||
|
||||
|
@ -1329,14 +1329,8 @@ void mp_play_files(struct MPContext *mpctx)
|
||||
|
||||
if (mpctx->stop_play == PT_NEXT_ENTRY) {
|
||||
new_entry = mp_next_file(mpctx, +1, false);
|
||||
} else if (mpctx->stop_play == PT_CURRENT_ENTRY) {
|
||||
} else {
|
||||
new_entry = mpctx->playlist->current;
|
||||
} else if (mpctx->stop_play == PT_RESTART) {
|
||||
// The same as PT_CURRENT_ENTRY, unless we decide that the current
|
||||
// playlist entry can be removed during playback.
|
||||
new_entry = mpctx->playlist->current;
|
||||
} else { // PT_STOP
|
||||
playlist_clear(mpctx->playlist);
|
||||
}
|
||||
|
||||
mpctx->playlist->current = new_entry;
|
||||
|
Loading…
Reference in New Issue
Block a user