diff options
author | wm4 <wm4@nowhere> | 2014-09-02 22:28:11 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-09-02 22:28:11 +0200 |
commit | bf74a4cc4665f152212c0e165bbe2a20d535021c (patch) | |
tree | fe0ba754f0525cd3345be86e092d6e471fbdb734 /player | |
parent | 6c1e5285181a0799c689ab71fc703fa67917e303 (diff) |
player: add --media-title option
Requested by ChrisK2.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 4 |
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]) |