vlc | branch: master | Pierre Ynard <[email protected]> | Sat Sep 17 21:15:44 2011 +0200| [767cec1d079b3b45a15a6ed2bf7c017048e76cd0] | committer: Pierre Ynard
vimeo.lua: spoof user-agent with something inconspicuous This is needed for HD > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=767cec1d079b3b45a15a6ed2bf7c017048e76cd0 --- share/lua/playlist/vimeo.lua | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/share/lua/playlist/vimeo.lua b/share/lua/playlist/vimeo.lua index 5e194c2..e02a195 100644 --- a/share/lua/playlist/vimeo.lua +++ b/share/lua/playlist/vimeo.lua @@ -32,7 +32,10 @@ function parse() p = {} if string.match ( vlc.path, "vimeo.com/%d+" ) then _,_,id = string.find( vlc.path, "vimeo.com/(.*)") - return { { path = "http://vimeo.com/moogaloop/load/clip:" .. id .. "/local/", name = "Vimeo playlist" } } + -- Vimeo disables HD if the user-agent contains "VLC", so we + -- set it to something inconspicuous. We do it here because + -- they seem to do some detection across requests + return { { path = "http://vimeo.com/moogaloop/load/clip:" .. id .. "/local/", name = "Vimeo playlist", options = { ":http-user-agent=Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2" } } } end if string.match ( vlc.path, "vimeo.com/moogaloop" ) then _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
