Dailymotion: fix for other domains and description parsing
authorFabio Ritrovato <exsephiroth87@gmail.com>
Tue, 21 Jul 2009 10:19:53 +0000 (12:19 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 21 Jul 2009 10:33:50 +0000 (12:33 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
share/lua/playlist/dailymotion.lua

index f4545c6..eb6fb9d 100644 (file)
@@ -24,7 +24,7 @@
 -- Probe function.
 function probe()
     return vlc.access == "http"
-        and string.match( vlc.path, "dailymotion.com" ) 
+        and string.match( vlc.path, "dailymotion." ) 
         and string.match( vlc.peek( 2048 ), "<!DOCTYPE.*video_type" )
 end
 
@@ -85,7 +85,7 @@ function parse()
         end
         if string.match( line, "<meta name=\"description\"" )
         then
-            description = vlc.strings.resolve_xml_special_chars( find( line, "name=\"description\" content=\"(.-)\"" ) )
+            description = vlc.strings.resolve_xml_special_chars( find( line, "name=\"description\" lang=\".-\" content=\"(.-)\"" ) )
         end
         if path and name and description and arturl then break end
     end