From 4758866a1821efb6fa022b7bde45fabbe6cbdd58 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Oct 2014 15:13:04 +0200 Subject: player: minor simplification --- player/command.c | 2 +- player/loadfile.c | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/player/command.c b/player/command.c index f0d96bd509..3a280e1353 100644 --- a/player/command.c +++ b/player/command.c @@ -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; diff --git a/player/loadfile.c b/player/loadfile.c index 2c0709dda7..cf6227e7a4 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -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) { - 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. + } else { new_entry = mpctx->playlist->current; - } else { // PT_STOP - playlist_clear(mpctx->playlist); } mpctx->playlist->current = new_entry; -- cgit v1.2.3