Commit 6531f87c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Koreus: remove tabs

(cherry picked from commit 6badf29945bd34120dc54461a9d4b96510c4e7c8)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 91446240
...@@ -22,7 +22,7 @@ function probe() ...@@ -22,7 +22,7 @@ function probe()
if vlc.access ~= "http" and vlc.access ~= "https" then if vlc.access ~= "http" and vlc.access ~= "https" then
return false return false
end end
koreus_site = string.match( vlc.path, "koreus" ) koreus_site = string.match( vlc.path, "koreus" )
if not koreus_site then if not koreus_site then
return false return false
end end
...@@ -31,58 +31,58 @@ end ...@@ -31,58 +31,58 @@ end
-- Parse function. -- Parse function.
function parse() function parse()
while true do while true do
line = vlc.readline() line = vlc.readline()
if not line then break end if not line then break end
if string.match( line, "<meta name=\"title\"" ) then if string.match( line, "<meta name=\"title\"" ) then
_,_,name = string.find( line, "content=\"(.-)\"" ) _,_,name = string.find( line, "content=\"(.-)\"" )
name = vlc.strings.resolve_xml_special_chars( name ) name = vlc.strings.resolve_xml_special_chars( name )
end end
if string.match( line, "<meta name=\"description\"" ) then if string.match( line, "<meta name=\"description\"" ) then
_,_,description = string.find( line, "content=\"(.-)\"" ) _,_,description = string.find( line, "content=\"(.-)\"" )
if (description ~= nil) then if (description ~= nil) then
description = vlc.strings.resolve_xml_special_chars( description ) description = vlc.strings.resolve_xml_special_chars( description )
end end
end end
if string.match( line, "<meta name=\"author\"" ) then if string.match( line, "<meta name=\"author\"" ) then
_,_,artist = string.find( line, "content=\"(.-)\"" ) _,_,artist = string.find( line, "content=\"(.-)\"" )
artist = vlc.strings.resolve_xml_special_chars( artist ) artist = vlc.strings.resolve_xml_special_chars( artist )
end end
if string.match( line, "link rel=\"image_src\"" ) then if string.match( line, "link rel=\"image_src\"" ) then
_,_,arturl = string.find( line, "href=\"(.-)\"" ) _,_,arturl = string.find( line, "href=\"(.-)\"" )
end end
vid_url = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.mp4)' ) vid_url = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.mp4)' )
if vid_url then if vid_url then
path_url = vid_url path_url = vid_url
end end
vid_url_hd = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%-hd%.mp4)' ) vid_url_hd = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%-hd%.mp4)' )
if vid_url_hd then if vid_url_hd then
path_url_hd = vid_url_hd path_url_hd = vid_url_hd
end end
vid_url_webm = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.webm)' ) vid_url_webm = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.webm)' )
if vid_url_webm then if vid_url_webm then
path_url_webm = vid_url_webm path_url_webm = vid_url_webm
end end
vid_url_flv = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.flv)' ) vid_url_flv = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.flv)' )
if vid_ulr_flv then if vid_ulr_flv then
path_url_flv = vid_url_flv path_url_flv = vid_url_flv
end end
end end
if path_url_hd then if path_url_hd then
return { { path = path_url_hd; name = name; description = description; artist = artist; arturl = arturl } } return { { path = path_url_hd; name = name; description = description; artist = artist; arturl = arturl } }
elseif path_url then elseif path_url then
return { { path = path_url; name = name; description = description; artist = artist; arturl = arturl } } return { { path = path_url; name = name; description = description; artist = artist; arturl = arturl } }
elseif path_url_webm then elseif path_url_webm then
return { { path = path_url_webm; name = name; description = description; artist = artist; arturl = arturl } } return { { path = path_url_webm; name = name; description = description; artist = artist; arturl = arturl } }
elseif path_url_flv then elseif path_url_flv then
return { { path = path_url_flv; name = name; description = description; artist = artist; arturl = arturl } } return { { path = path_url_flv; name = name; description = description; artist = artist; arturl = arturl } }
else else
return {} return {}
end end
end end
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