]> git.sesse.net Git - vlc/commitdiff
lua demuxer: update dailymotion thumbnails
authorRafaël Carré <funman@videolan.org>
Fri, 25 Jan 2008 14:45:13 +0000 (14:45 +0000)
committerRafaël Carré <funman@videolan.org>
Fri, 25 Jan 2008 14:45:13 +0000 (14:45 +0000)
share/luaplaylist/dailymotion.lua

index 659b51a41ed5c7526bea3d2a5fcb82cd201e913e..bd50437f795558adbf21f9e87c0abd2ca8899b58 100644 (file)
@@ -47,9 +47,10 @@ function parse()
             name = vlc.resolve_xml_special_chars( string.gsub( line, "^.*name=\"description\" content=\"%w+ (.*) %w+ %w+ %w+ %w+ Videos\..*$", "%1" ) )
             description = vlc.resolve_xml_special_chars( string.gsub( line, "^.*name=\"description\" content=\"%w+ .* %w+ %w+ %w+ %w+ Videos\. ([^\"]*)\".*$", "%1" ) )
         end
-        if string.match( line, "<link rel=\"thumbnail\"" )
+        if string.match( line, "\\\"videoPreview\\\"" )
         then
-            arturl = string.gsub( line, "^.*\"thumbnail\" type=\"([^\"]*)\".*$", "http://%1" ) -- looks like the dailymotion people mixed up type and href here ...
+            arturl = string.gsub( line, "^.*\\\"videoPreview\\\":\\\"([^\"]*).*$", "%1" )
+            arturl = string.gsub( arturl, "\\", "" )
         end
         if path and name and description and arturl then break end
     end