From: Ilkka Ollakka Date: Sun, 6 Jun 2010 09:20:01 +0000 (+0300) Subject: appletrailers: fix location finding X-Git-Tag: 1.2.0-pre1~6290 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c3d96600618add7768f713ccf1fcdddaf06dd1fb;p=vlc appletrailers: fix location finding --- diff --git a/share/lua/sd/appletrailers.lua b/share/lua/sd/appletrailers.lua index 93d3effdf8..3675c5d9cb 100644 --- a/share/lua/sd/appletrailers.lua +++ b/share/lua/sd/appletrailers.lua @@ -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...")