liveleak.lua: Improve URL probe function
authorMarvin Scholz <epirat07@gmail.com>
Tue, 25 Oct 2016 07:47:52 +0000 (09:47 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 25 Oct 2016 20:14:00 +0000 (23:14 +0300)
Improve the URL probe function to not match URLs like
http://example.org/www.liveleak.com/view?i=312_1477377129
as those should not be handled by this script.

Ref. #17488

Acked-by: Filip Roséen <filip@atch.se>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
share/lua/playlist/liveleak.lua

index 6811977..c7ce695 100644 (file)
@@ -23,7 +23,7 @@
 -- Probe function.
 function probe()
     return vlc.access == "http"
-        and string.match( vlc.path, "www.liveleak.com/view" )
+        and string.match( vlc.path, "^www%.liveleak%.com/view" )
 end
 
 -- Util function