[vlc-commits] youtube.lua: handle relative reference in javascript URL

Pierre Ynard git at videolan.org
Sat Dec 7 18:24:39 CET 2013


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Sat Dec  7 18:23:51 2013 +0100| [87fcede4b4839ff99dbc52b71664d28c02eb381e] | committer: Pierre Ynard

youtube.lua: handle relative reference in javascript URL

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=87fcede4b4839ff99dbc52b71664d28c02eb381e
---

 share/lua/playlist/youtube.lua |    1 +
 1 file changed, 1 insertion(+)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 30da2f8..9cadd1f 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -269,6 +269,7 @@ function parse()
                 local js_url = string.match( line, "\"js\": \"(.-)\"" )
                 if js_url then
                     js_url = string.gsub( js_url, "\\/", "/" )
+                    js_url = string.gsub( js_url, "^//", vlc.access.."://" )
                 end
 
                 if not fmt then



More information about the vlc-commits mailing list