aboutsummaryrefslogtreecommitdiffhomepage
path: root/player
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-09-02 22:28:11 +0200
committerGravatar wm4 <wm4@nowhere>2014-09-02 22:28:11 +0200
commitbf74a4cc4665f152212c0e165bbe2a20d535021c (patch)
treefe0ba754f0525cd3345be86e092d6e471fbdb734 /player
parent6c1e5285181a0799c689ab71fc703fa67917e303 (diff)
player: add --media-title option
Requested by ChrisK2.
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 02f8ce55bf..3e5849fe80 100644
--- a/player/command.c
+++ b/player/command.c
@@ -229,6 +229,10 @@ static int mp_property_media_title(void *ctx, struct m_property *prop,
{
MPContext *mpctx = ctx;
char *name = NULL;
+ if (mpctx->opts->media_title)
+ name = mpctx->opts->media_title;
+ if (name && name[0])
+ return m_property_strdup_ro(action, arg, name);
if (mpctx->resolve_result)
name = mpctx->resolve_result->title;
if (name && name[0])