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

Konstantin Pavlov git at videolan.org
Thu Jul 14 13:27:57 CEST 2011


vlc/vlc-1.1 | branch: master | Konstantin Pavlov <thresh at videolan.org> | Thu Jul 14 10:41:35 2011 +0400| [db1a0b4396e3ddd2b81c1466caf23a937aec6a6f] | committer: Jean-Baptiste Kempf

LUA: Fix MPORA playlist parser.
(cherry picked from commit 04d461bceab027028f6df19e8032e0df517f071c)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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