]> git.sesse.net Git - vlc/commitdiff
LUA: Fix MPORA playlist parser.
authorKonstantin Pavlov <thresh@videolan.org>
Thu, 14 Jul 2011 06:41:35 +0000 (10:41 +0400)
committerKonstantin Pavlov <thresh@videolan.org>
Thu, 14 Jul 2011 06:53:43 +0000 (10:53 +0400)
share/lua/playlist/mpora.lua

index 8282f761b446c80c90c13dfdecbfd587b05b2dd3..cfee5d0772ff9ab383b14026c63309f9ede8e3f3 100644 (file)
@@ -39,9 +39,8 @@ function parse()
         if string.match( line, "image_src" ) then
             _,_,arturl = string.find( line, "image_src\" href=\"(.*)\" />" )
         end
-
-        if string.match( line, "filmID" ) then
-            _,_,video = string.find( line, "var filmID = \'(.*)\';")
+        if string.match( line, "video_src" ) then
+            _,_,video = string.find( line, "href=\"http://video\.mpora\.com/ep/(.*).swf\" />" )
         end
 
     end
@@ -68,7 +67,7 @@ function parse()
         hd = vlc.stream("http://api.mpora.com/tv/player/playlist/vid/"..video.."/hd/true/")
         page = hd:read( 65653 )
         hdurl = string.match( page, "url=\"(.*)\" />")
-        table.insert( p, { path = hdurl; name = name.." (HD)"; arturl = arturl } )
+        table.insert( p, { path = hdurl; name = name.." (HD)"; arturl = arturl; } )
     end
 
     return p