[vlc-commits] dailymotion.lua: tighten URL probe function
Pierre Ynard
git at videolan.org
Wed Oct 26 06:40:26 CEST 2016
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Wed Oct 26 06:39:32 2016 +0200| [41bc3687d8a0ea9d6204470b714f555cadec0f05] | committer: Pierre Ynard
dailymotion.lua: tighten URL probe function
Ref. #17488
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=41bc3687d8a0ea9d6204470b714f555cadec0f05
---
share/lua/playlist/dailymotion.lua | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/share/lua/playlist/dailymotion.lua b/share/lua/playlist/dailymotion.lua
index f85ca62..a3782f6 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -23,11 +23,8 @@
-- Probe function.
function probe()
- if vlc.access ~= "http" and vlc.access ~= "https" then
- return false
- end
-
- return ( string.match( vlc.path, "www.dailymotion.com/video" ) )
+ return ( vlc.access == "http" or vlc.access == "https" )
+ and string.match( vlc.path, "^www%.dailymotion%.com/video/" )
end
-- Parse function.
More information about the vlc-commits
mailing list