From c3d96600618add7768f713ccf1fcdddaf06dd1fb Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Sun, 6 Jun 2010 12:20:01 +0300 Subject: [PATCH] appletrailers: fix location finding --- share/lua/sd/appletrailers.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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...") -- 2.39.2