[vlc-devel] commit: appleplaylist.lua: fix apple trailers again, change useragent ( Ilkka Ollakka )

git version control git at videolan.org
Tue Oct 6 22:05:44 CEST 2009


vlc | branch: 1.0-bugfix | Ilkka Ollakka <ileoo at videolan.org> | Tue Oct  6 22:39:18 2009 +0300| [c0211b7b29249bc8ca53d19b546b563991cd5e78] | committer: 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 ;)
(cherry picked from commit 8b3e9a1df0566bb40b750331d174c0d247e6c414)

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

 share/lua/playlist/appletrailers.lua |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua
index c2fa431..dd1a5f1 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, "<title>" )
         then




More information about the vlc-devel mailing list