summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c4
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}
};