aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-10-01 09:35:29 +0530
committersinanmohd <sinan@sinanmohd.com>2023-10-01 09:35:29 +0530
commita0cc0578c5326cc6e720a3d53d62bd424a9f51be (patch)
treee4d05a11db1a3facf515d3eb334dd372088a2d3b
parent715d6969d8b6094e93d699c08f35fc2b2b110d01 (diff)
mpv: don't fetch subtitles for vtube
-rw-r--r--main.lua8
1 files changed, 7 insertions, 1 deletions
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