]> git.sesse.net Git - vlc/commitdiff
appletrailers: fix location finding
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 6 Jun 2010 09:20:01 +0000 (12:20 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 6 Jun 2010 09:20:42 +0000 (12:20 +0300)
share/lua/sd/appletrailers.lua

index 93d3effdf8d578c884f0a8c86b4938919bfc2a30..3675c5d9cbd7cec36d5f81eb84e124d9f53db1a6 100644 (file)
@@ -39,9 +39,12 @@ function main()
          if string.match( line, "title" ) then 
             title = vlc.strings.resolve_xml_special_chars( find( line, "title\":\"(.-)\""))
             art = find( line, "poster\":\"(.-)\"")
-            art = "http://trailers.apple.com"..art
+            if string.match( art, "http://" ) then
+            else
+                art = "http://trailers.apple.com"..art
+            end
 
-            url = find( line, "url\":\"(.-)\"")
+            url = find( line, "location\":\"(.-)\"")
             playlist = vlc.stream( "http://trailers.apple.com"..url.."includes/playlists/web.inc" )
             if not playlist then 
                 vlc.msg.info("Didn't get playlist...")