aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-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