diff options
author | wm4 <wm4@nowhere> | 2015-04-28 22:04:37 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-04-29 18:39:49 +0900 |
commit | 73086a6ba3de013e1aae42ed375f39592d100031 (patch) | |
tree | dab0b3ec2ad8d477f477acb2f36bc0943fbf7c6f /player/command.c | |
parent | 0126999cde0f7c4c990dfe6503126148eae9a78f (diff) | |
download | mpv-73086a6ba3de013e1aae42ed375f39592d100031.tar.bz2 mpv-73086a6ba3de013e1aae42ed375f39592d100031.tar.xz |
player: log track list when adding or removing external files
Should help with debugging, and might be slightly more userfriendly.
Note that this is called manually in multiple entry-points, instead of
the functions doing the actual work (like mp_remove_track()). This is
done so that exiting the player or calling the sub_reload command won't
print redundant in-between states.
(cherry picked from commit 0c0c8cd44e42791b80e7de33b653aa9143865bbb)
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 3556986473..4b1979b14d 100644 --- a/player/command.c +++ b/player/command.c @@ -4530,6 +4530,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re char *lang = cmd->args[3].v.s; if (lang && lang[0]) t->lang = talloc_strdup(t, lang); + print_track_list(mpctx); break; } @@ -4540,6 +4541,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re if (!t) return -1; mp_remove_track(mpctx, t); + print_track_list(mpctx); break; } @@ -4553,6 +4555,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re if (nt) { mp_remove_track(mpctx, t); mp_switch_track(mpctx, nt->type, nt); + print_track_list(mpctx); return 0; } } @@ -4573,6 +4576,8 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re opts->sub_id_ff, opts->sub_lang); if (s && s->is_external) mp_switch_track(mpctx, STREAM_SUB, s); + + print_track_list(mpctx); } break; } |