diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c index c16f804883..0f3e455929 100644 --- a/player/command.c +++ b/player/command.c @@ -363,8 +363,6 @@ static int mp_property_media_title(void *ctx, struct m_property *prop, name = mpctx->opts->media_title; if (name && name[0]) return m_property_strdup_ro(action, arg, name); - if (name && name[0]) - return m_property_strdup_ro(action, arg, name); if (mpctx->master_demuxer) { name = mp_tags_get_str(mpctx->master_demuxer->metadata, "title"); if (name && name[0]) @@ -373,6 +371,8 @@ static int mp_property_media_title(void *ctx, struct m_property *prop, if (name && name[0]) return m_property_strdup_ro(action, arg, name); } + if (mpctx->playing && mpctx->playing->title) + return m_property_strdup_ro(action, arg, mpctx->playing->title); return mp_property_filename(ctx, prop, action, arg); } @@ -2923,6 +2923,7 @@ static int get_playlist_entry(int item, int action, void *arg, void *ctx) {"filename", SUB_PROP_STR(e->filename)}, {"current", SUB_PROP_FLAG(1), .unavailable = !current}, {"playing", SUB_PROP_FLAG(1), .unavailable = !playing}, + {"title", SUB_PROP_STR(e->title), .unavailable = !e->title}, {0} }; |