Commit d88cf188 authored by Pierre Ynard's avatar Pierre Ynard

lua: tighten URL probe functions of playlist scripts

These scripts are possibly still otherwise outdated and broken.

Ref. #17488
parent 65b6c2f8
......@@ -22,8 +22,9 @@
-- Probe function.
function probe()
local path = vlc.path:gsub("^www%.", "")
return vlc.access == "http"
and string.match( vlc.path, "bbc.co.uk/iplayer/" )
and string.match( path, "^bbc%.co%.uk/iplayer/.+" )
end
-- Parse function.
......
......@@ -20,9 +20,9 @@
-- Probe function.
function probe()
local path = vlc.path:gsub("^www%.", "")
return vlc.access == "http"
and ( string.match( vlc.path, "^break.com" )
or string.match( vlc.path, "^www.break.com" ) )
and string.match( path, "^break%.com/video/.+" )
end
-- Parse function.
......
......@@ -20,7 +20,7 @@
-- Probe function.
function probe()
return vlc.access == "http" and string.match( vlc.path, "www.canalplus.fr" )
return vlc.access == "http" and string.match( vlc.path, "^www%.canalplus%.fr/.+" )
end
-- Parse function.
......
......@@ -25,7 +25,7 @@ require "simplexml"
-- Probe function.
function probe()
return vlc.access == "http"
and string.match( vlc.path, "api.jamendo.com/" )
and string.match( vlc.path, "^api%.jamendo%.com/" )
and string.match( vlc.path, "get2" )
and string.match( vlc.path, "track" )
and string.match( vlc.path, "xml" )
......
......@@ -23,7 +23,7 @@
-- Probe function.
function probe()
return vlc.access == "http"
and string.match( vlc.path, "www.katsomo.fi" )
and string.match( vlc.path, "^www%.katsomo%.fi/" )
and ( string.match( vlc.path, "treeId" ) or string.match( vlc.path, "progId" ) )
end
......
......@@ -22,8 +22,9 @@
-- Probe function.
function probe()
local path = vlc.path:gsub("^www%.", "")
return vlc.access == "http"
and string.match( vlc.path, "lelombrik.net/videos" )
and string.match( path, "^lelombrik%.net/videos" )
end
-- Parse function.
......
......@@ -20,8 +20,9 @@
-- Probe function.
function probe()
local path = vlc.path:gsub("^www%.", "")
return vlc.access == "http"
and string.match( vlc.path, "metacafe.com" )
and string.match( vlc.path, "^metacafe%.com/" )
and ( string.match( vlc.path, "watch/" )
or string.match( vlc.path, "mediaURL=" ) )
end
......
......@@ -22,8 +22,9 @@
-- Probe function.
function probe()
local path = vlc.path:gsub("^www%.", "")
return vlc.access == "http"
and string.match( vlc.path, "pinkbike.com/video/%d+" )
and string.match( path, "^pinkbike%.com/video/%d+" )
end
-- Parse function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment