]> git.sesse.net Git - vlc/commitdiff
lua apple_iphone: strip " - .*" from title and change options
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 16 May 2010 19:24:16 +0000 (22:24 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 16 May 2010 19:25:51 +0000 (22:25 +0300)
add demux=avformat and play-and-pause, remove play-and-stop as it's
playlist-option not item. demux=avformat seems to help littlebit on
constant seeking (we don't want to dos as http-access closes and starts
new connection on seek currently ).

share/lua/playlist/appletrailers_iphone.lua

index 0edab6c2e0920e28687be81e7018f342986dd1ac..e72bbb3ca04e30dc7b1f2512e4396d9831930bbe 100644 (file)
@@ -52,6 +52,7 @@ function parse()
         if string.match( line, "<title>" )
         then
             title = vlc.strings.resolve_xml_special_chars( find( line, "<title>(.-)<" ) )
+            title = string.gsub( title, " %- .*", "" )
         end
         if string.match( line, "<meta name=\"Description\"" )
         then
@@ -60,7 +61,7 @@ function parse()
     end
     for index,resolution in ipairs({"480p","720p","1080p"}) do
         locationurl = string.gsub( path, "r320i.mov","h"..resolution..".mov")
-        table.insert( p, { path=locationurl ; name=title.." ("..resolution..")"; arturl=arturl; description=description; options={":http-user-agent=Quicktime/7.2.0 vlc lua edition",":input-fast-seek",":play-and-stop"};} )
+        table.insert( p, { path=locationurl ; name=title.." ("..resolution..")"; arturl=arturl; description=description; options={":http-user-agent=Quicktime/7.2.0 vlc lua edition",":play-and-pause",":demux=avformat"};} )
     end
     return p
 end