From cb7cc6e86a49864e2349c19484279370268e89fd Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Sun, 9 Sep 2007 21:01:31 +0000 Subject: [PATCH] Fix the url translation --- share/luaplaylist/dailymotion.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/share/luaplaylist/dailymotion.lua b/share/luaplaylist/dailymotion.lua index b5182d0b8f..93e17cfdd8 100644 --- a/share/luaplaylist/dailymotion.lua +++ b/share/luaplaylist/dailymotion.lua @@ -1,5 +1,10 @@ -- $Id$ +--[[ + Translate Daily Motion video webpages URLs to the corresponding + FLV URL. +--]] + -- Probe function. function probe() return vlc.access == "http" @@ -13,9 +18,11 @@ function parse() do line = vlc.readline() if not line then break end - if string.match( line, "param name=\"flashvars\" value=\"url=" ) + if string.match( line, "param name=\"flashvars\" value=\".*url=" ) then - path = vlc.decode_uri( string.gsub( line, "^.*param name=\"flashvars\" value=\"url=([^&]*).*$", "%1" ) ) + vlc.msg_err( "Tada!" ) + path = vlc.decode_uri( string.gsub( line, "^.*param name=\"flashvars\" value=\".*url=([^&]*).*$", "%1" ) ) + vlc.msg_err( path ) end --[[ if string.match( line, "" ) then -- 2.39.2