summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-14 16:34:09 +0100
committerwm4 <wm4@nowhere>2016-03-14 16:34:09 +0100
commit37aee2304a69eff4dba84a106e52c38dc1839a37 (patch)
tree0b9b28abe0fc1337d37bcec2abae53fe6f70119d /player/command.c
parenta1ffd7407def20d156e6720d6422054e27c883e0 (diff)
downloadmpv-37aee2304a69eff4dba84a106e52c38dc1839a37.tar.bz2
mpv-37aee2304a69eff4dba84a106e52c38dc1839a37.tar.xz
command: dump tracklist if sub-add is run with the "cached" flag
mp_switch_track() doesn't do it automatically for whatever reason, so do it here.
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index d2a8308a58..068ab7cf5e 100644
--- a/player/command.c
+++ b/player/command.c
@@ -4827,6 +4827,8 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re
struct track *t = find_track_with_url(mpctx, type, cmd->args[0].v.s);
if (t) {
mp_switch_track(mpctx, t->type, t, FLAG_MARK_SELECTION);
+ if (mpctx->playback_initialized)
+ print_track_list(mpctx, "Track switched:");
return 0;
}
}