4 Translate trailers.apple.com video webpages URLs to the corresponding
10 return vlc.access == "http"
11 and string.match( vlc.path, "trailers.apple.com" )
20 if not line then break end
21 if string.match( line, "http://movies.apple.com/movies/.*%.mov" )
22 or string.match( line, "http://images.apple.com/movies/.*%.mov" )
24 if string.match( line, "http://movies.apple.com/movies/.*%.mov" ) then
25 path = vlc.decode_uri( string.gsub( line, "^.*(http://movies.apple.com/movies/.*%.mov).*$", "%1" ) )
26 elseif string.match( line, "http://images.apple.com/movies/.*%.mov" ) then
27 path = vlc.decode_uri( string.gsub( line, "^.*(http://images.apple.com/movies/.*%.mov).*$", "%1" ) )
29 if string.match( path, "480p" ) then
31 elseif string.match( path, "720p" ) then
33 elseif string.match( path, "1080p" ) then
34 extraname = " (1080p)"
38 table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path } )
40 if string.match( line, "<title>" )
42 title = vlc.decode_uri( string.gsub( line, "^.*<title>([^<]*).*$", "%1" ) )
44 if string.match( line, "<meta name=\"Description\"" )
46 description = vlc.resolve_xml_special_chars( string.gsub( line, "^.*name=\"Description\" content=\"([^\"]*)\".*$", "%1" ) )