From 1fbaf4602e909ac037d69e5d01672ffcabea63fb Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Sat, 20 May 2023 14:56:31 +0200 Subject: [PATCH] DOCS/mpv: add an example for applying profiles to certain paths It is worth adding this example because it has been asked multiple times in the issue tracker and the IRC channel. string.find() is used because it's 20 times faster than string.match(). --- DOCS/man/mpv.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DOCS/man/mpv.rst b/DOCS/man/mpv.rst index a468fabba3..fc7122cb5b 100644 --- a/DOCS/man/mpv.rst +++ b/DOCS/man/mpv.rst @@ -844,6 +844,14 @@ and unintuitive behavior. profile-cond=width >= 1280 hue=-50 + Make only videos containing "youtube" or "youtu.be" in their path brighter: + + :: + + [youtube] + profile-cond=path:find('youtu%.?be') + gamma=20 + If you want the profile to be reverted if the condition goes to false again, you can set ``profile-restore``: