From a0cc0578c5326cc6e720a3d53d62bd424a9f51be Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 1 Oct 2023 09:35:29 +0530 Subject: mpv: don't fetch subtitles for vtube --- main.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index feefa6a..a057688 100644 --- a/main.lua +++ b/main.lua @@ -12,7 +12,13 @@ local mkdir = function (path) end local sub_needed = function () - local duration, isvideo + local duration, isvideo, name + + name = mp.get_property_native('path') + if name:find('https?://www.youtube.com/') or + name:find('https?://youtu.be/') then + return false + end duration = tonumber(mp.get_property('duration')) if duration < 900 then -- duration is less than 15 minutes -- cgit v1.2.3