diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2017-07-08 14:43:37 +0100 |
---|---|---|
committer | Ricardo Constantino <wiiaboo@gmail.com> | 2017-07-11 14:18:29 +0100 |
commit | 042e98f4c9afb5cb41c727a6cf61a1e447710d9b (patch) | |
tree | fe138a33b01a592595de963a696784f45849a7c9 /DOCS | |
parent | b1165ce3a22194d1f929c9af7ea65d19460fd941 (diff) | |
download | mpv-042e98f4c9afb5cb41c727a6cf61a1e447710d9b.tar.bz2 mpv-042e98f4c9afb5cb41c727a6cf61a1e447710d9b.tar.xz |
ytdl_hook: add option to exclude URLs from being parsed
This is more of a niche usecase than --ytdl-format and --ytdl-raw-options,
so a simple script option should be enough.
Either create lua-settings/ytdl_hook.conf with
'exclude=example.com,sub.example.com' option or
"--script-opts=ytdl_hook-exclude=example.com,sub.example.com"
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/man/options.rst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index cfe586f03c..6f20a4f3f5 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -531,6 +531,26 @@ Program Behavior If the script can't do anything with an URL, it will do nothing. + The `exclude` script option accepts a comma-separated list of URL patterns + which mpv should not use with youtube-dl. The patterns are matched after + the ``http(s)://`` part of the URL. + + ``^`` matches the beginning of the URL, ``$`` matches its end, and you + should use ``%`` before any of the characters ``^$()%,.[]*+-?`` to match + that character. + + .. admonition:: Example + + ``--script-opts=ytdl_hook-exclude='^youtube%.com'`` will exclude any + URL that starts with ``http://youtube.com`` or + ``https://youtube.com``. + ``--script-opts=ytdl_hook-exclude='%.mkv$,%.mp4$'`` will exclude any + URL that ends with ``.mkv`` or ``.mp4``. + + See more `lua patterns here`__. + __ https://www.lua.org/manual/5.1/manual.html#5.4.1 + + ``--ytdl-format=<best|worst|mp4|webm|...>`` Video format/quality that is directly passed to youtube-dl. The possible values are specific to the website and the video, for a given url the |