summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-02 22:28:11 +0200
committerwm4 <wm4@nowhere>2014-09-02 22:28:11 +0200
commitbf74a4cc4665f152212c0e165bbe2a20d535021c (patch)
treefe0ba754f0525cd3345be86e092d6e471fbdb734 /player/command.c
parent6c1e5285181a0799c689ab71fc703fa67917e303 (diff)
downloadmpv-bf74a4cc4665f152212c0e165bbe2a20d535021c.tar.bz2
mpv-bf74a4cc4665f152212c0e165bbe2a20d535021c.tar.xz
player: add --media-title option
Requested by ChrisK2.
Diffstat (limited to 'player/command.c')
-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])