[vlc-commits] LUA: Fix MPORA playlist parser.

Konstantin Pavlov git at videolan.org
Thu Jul 14 09:46:24 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Thu Jul 14 10:41:35 2011 +0400| [04d461bceab027028f6df19e8032e0df517f071c] | committer: Konstantin Pavlov

LUA: Fix MPORA playlist parser.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=04d461bceab027028f6df19e8032e0df517f071c
---

 share/lua/playlist/mpora.lua |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/share/lua/playlist/mpora.lua b/share/lua/playlist/mpora.lua
index 8282f76..cfee5d0 100644
--- a/share/lua/playlist/mpora.lua
+++ b/share/lua/playlist/mpora.lua
@@ -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



More information about the vlc-commits mailing list