diff options
author | wm4 <wm4@nowhere> | 2014-11-17 22:43:30 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-17 22:48:38 +0100 |
commit | 469eb321e8ec123936ebe74ab01e1c24341ba486 (patch) | |
tree | 38216c2680be1a1ce6f1d0d01387df55c0d2ebf5 /player | |
parent | ebd41bdf6c04bdad5a6e4a737bbd2d338f2c8887 (diff) | |
download | mpv-469eb321e8ec123936ebe74ab01e1c24341ba486.tar.bz2 mpv-469eb321e8ec123936ebe74ab01e1c24341ba486.tar.xz |
command: adjust previous commit
Due to the current code structure, the "current" entry and the entry
which is playing can be different. This is probably silly, but still
try to mark the entries correctly.
Refs #1260.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index a0b459d6fa..f6c20a6cb1 100644 --- a/player/command.c +++ b/player/command.c @@ -2849,9 +2849,11 @@ static int get_playlist_entry(int item, int action, void *arg, void *ctx) if (!e) return M_PROPERTY_ERROR; - bool playing = e == mpctx->playing; + bool current = mpctx->playlist->current == e; + bool playing = mpctx->playing == e; struct m_sub_property props[] = { {"filename", SUB_PROP_STR(e->filename)}, + {"current", SUB_PROP_FLAG(1), .unavailable = !current}, {"playing", SUB_PROP_FLAG(1), .unavailable = !playing}, {0} }; |