From: Ilkka Ollakka Date: Tue, 6 Oct 2009 19:39:18 +0000 (+0300) Subject: appleplaylist.lua: fix apple trailers again, change useragent X-Git-Tag: 1.1.0-ff~3004 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=8b3e9a1df0566bb40b750331d174c0d247e6c414;p=vlc 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 ;) --- diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua index c2fa43100d..dd1a5f1246 100644 --- a/share/lua/playlist/appletrailers.lua +++ b/share/lua/playlist/appletrailers.lua @@ -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, "" ) then