From 469eb321e8ec123936ebe74ab01e1c24341ba486 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 17 Nov 2014 22:43:30 +0100 Subject: 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. --- player/command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'player/command.c') 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} }; -- cgit v1.2.3