[vlc-commits] Koreus: improve parsing and improve HTTPS
Jean-Baptiste Kempf
git at videolan.org
Tue Nov 11 16:19:57 CET 2014
vlc/vlc-2.2 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Nov 11 12:45:52 2014 +0100| [d5463d3c18d728825bb09ce0d6a74b7a291ce384] | committer: Jean-Baptiste Kempf
Koreus: improve parsing and improve HTTPS
Close #12744
Thanks to Ruito
(cherry picked from commit aacca35310f0395b6715d282548ff8221beee836)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=d5463d3c18d728825bb09ce0d6a74b7a291ce384
---
share/lua/playlist/koreus.lua | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
diff --git a/share/lua/playlist/koreus.lua b/share/lua/playlist/koreus.lua
index ce6a793..4bbbbd6 100644
--- a/share/lua/playlist/koreus.lua
+++ b/share/lua/playlist/koreus.lua
@@ -19,7 +19,7 @@
-- Probe function.
function probe()
- if vlc.access ~= "http" then
+ if vlc.access ~= "http" and vlc.access ~= "https" then
return false
end
koreus_site = string.match( vlc.path, "koreus" )
@@ -52,10 +52,37 @@ function parse()
_,_,arturl = string.find( line, "href=\"(.-)\"" )
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
- return { { path = vid_url; name = name; description = description; artist = artist; arturl = arturl } }
+ path_url = vid_url
end
+
+ vid_url_hd = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%-hd%.mp4)' )
+ if vid_url_hd then
+ path_url_hd = vid_url_hd
+ end
+
+ vid_url_webm = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.webm)' )
+ if vid_url_webm then
+ path_url_webm = vid_url_webm
+ end
+
+ vid_url_flv = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.flv)' )
+ if vid_ulr_flv then
+ path_url_flv = vid_url_flv
+ end
+
+ end
+
+ if path_url_hd then
+ return { { path = path_url_hd; name = name; description = description; artist = artist; arturl = arturl } }
+ elseif path_url then
+ return { { path = path_url; name = name; description = description; artist = artist; arturl = arturl } }
+ elseif path_url_webm then
+ return { { path = path_url_webm; name = name; description = description; artist = artist; arturl = arturl } }
+ elseif path_url_flv then
+ return { { path = path_url_flv; name = name; description = description; artist = artist; arturl = arturl } }
+ else
+ return {}
end
- return {}
end
More information about the vlc-commits
mailing list