diff options
author | wm4 <wm4@nowhere> | 2014-11-17 22:07:50 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-17 22:16:52 +0100 |
commit | ebd41bdf6c04bdad5a6e4a737bbd2d338f2c8887 (patch) | |
tree | ac26dad120b3e0532781030bf8f9857c8f47d6a3 /player | |
parent | fb86750a674a5e335a0f90fe6dfe6efdda6698b3 (diff) | |
download | mpv-ebd41bdf6c04bdad5a6e4a737bbd2d338f2c8887.tar.bz2 mpv-ebd41bdf6c04bdad5a6e4a737bbd2d338f2c8887.tar.xz |
command: playlist property: return if an entry is currently playing
This actually doesn't even write/return the new sub-property, because
I dislike the idea of dumping that field for every single playlist
entry, even though it's "needed" only for one.
Fixes #1260.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 522dd8ec5a..a0b459d6fa 100644 --- a/player/command.c +++ b/player/command.c @@ -2849,8 +2849,10 @@ static int get_playlist_entry(int item, int action, void *arg, void *ctx) if (!e) return M_PROPERTY_ERROR; + bool playing = e == mpctx->playing; struct m_sub_property props[] = { {"filename", SUB_PROP_STR(e->filename)}, + {"playing", SUB_PROP_FLAG(1), .unavailable = !playing}, {0} }; |