mirror of https://github.com/mpv-player/mpv
loadfile: expose auto-forced-only when printing stream info
This commit is contained in:
parent
5c4852d173
commit
d8bd1c35ef
|
@ -258,7 +258,13 @@ static void print_stream(struct MPContext *mpctx, struct track *t)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
char b[2048] = {0};
|
char b[2048] = {0};
|
||||||
APPEND(b, " %3s %-5s", t->selected ? "(+)" : "", tname);
|
bool forced_only = false;
|
||||||
|
if (t->type == STREAM_SUB) {
|
||||||
|
int forced_opt = mpctx->opts->subs_rend->forced_subs_only;
|
||||||
|
if (forced_opt == 1 || (forced_opt && t->forced_only_def))
|
||||||
|
forced_only = t->selected;
|
||||||
|
}
|
||||||
|
APPEND(b, " %3s %-5s", t->selected ? (forced_only ? "(*)" : "(+)") : "", tname);
|
||||||
APPEND(b, " --%s=%d", selopt, t->user_tid);
|
APPEND(b, " --%s=%d", selopt, t->user_tid);
|
||||||
if (t->lang && langopt)
|
if (t->lang && langopt)
|
||||||
APPEND(b, " --%s=%s", langopt, t->lang);
|
APPEND(b, " --%s=%s", langopt, t->lang);
|
||||||
|
@ -268,6 +274,8 @@ static void print_stream(struct MPContext *mpctx, struct track *t)
|
||||||
APPEND(b, " (f)");
|
APPEND(b, " (f)");
|
||||||
if (t->attached_picture)
|
if (t->attached_picture)
|
||||||
APPEND(b, " [P]");
|
APPEND(b, " [P]");
|
||||||
|
if (forced_only)
|
||||||
|
APPEND(b, " [F]");
|
||||||
if (t->title)
|
if (t->title)
|
||||||
APPEND(b, " '%s'", t->title);
|
APPEND(b, " '%s'", t->title);
|
||||||
const char *codec = s ? s->codec->codec : NULL;
|
const char *codec = s ? s->codec->codec : NULL;
|
||||||
|
|
Loading…
Reference in New Issue