command: let track properties return option value in idle mode

In idle mode (no file playing), the track properties such as vid/sid/aid
should return the option setting, instead of the value "no".
This commit is contained in:
wm4 2015-07-29 00:09:44 +02:00
parent 0b52ac8a78
commit f2bba55e01
1 changed files with 5 additions and 1 deletions

View File

@ -1784,7 +1784,11 @@ static int property_switch_track(struct m_property *prop, int action, void *arg,
switch (action) {
case M_PROPERTY_GET:
*(int *) arg = track ? track->user_tid : -2;
if (mpctx->playback_initialized) {
*(int *)arg = track ? track->user_tid : -2;
} else {
*(int *)arg = mpctx->opts->stream_id[order][type];
}
return M_PROPERTY_OK;
case M_PROPERTY_PRINT:
if (!track)