1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-03 05:22:23 +00:00

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.
This commit is contained in:
wm4 2016-03-14 16:34:09 +01:00
parent a1ffd7407d
commit 37aee2304a

View File

@ -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); struct track *t = find_track_with_url(mpctx, type, cmd->args[0].v.s);
if (t) { if (t) {
mp_switch_track(mpctx, t->type, t, FLAG_MARK_SELECTION); mp_switch_track(mpctx, t->type, t, FLAG_MARK_SELECTION);
if (mpctx->playback_initialized)
print_track_list(mpctx, "Track switched:");
return 0; return 0;
} }
} }