Commit 8b3e9a1d authored by Ilkka Ollakka's avatar Ilkka Ollakka

appleplaylist.lua: fix apple trailers again, change useragent

Seems that they changed just on trailers page, that if useragent doesn't
contain QuickTime, it gives redirect back to trailers. So get stuff from movies
again, but tell useragent to be "QuickTime vlc lua edition".

Really if apple doesn't want vlc to be used as see apple-trailes, they could
atleast ask ;)
parent a04ff28b
......@@ -40,7 +40,6 @@ function parse()
if not line then break end
for path in string.gmatch( line, "http://movies.apple.com/movies/.-%.mov" ) do
path = vlc.strings.decode_uri( path )
path = string.gsub( path, "http://movies", "http://www" )
if string.match( path, "320" ) then
extraname = " (320p)"
elseif string.match( path, "480" ) then
......@@ -54,7 +53,7 @@ function parse()
else
extraname = ""
end
table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path } )
table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime\"" } )
end
if string.match( line, "<title>" )
then
......
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