[vlc-devel] [PATCH 2/3] Changes to support lua 5.2 number 2

Kelly Anderson kelly at silka.with-linux.com
Sun Jan 1 00:28:33 CET 2012


---
 share/lua/playlist/extreme.lua |   12 ++++++------
 share/lua/playlist/katsomo.lua |    2 +-
 share/lua/playlist/mpora.lua   |    4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/share/lua/playlist/extreme.lua b/share/lua/playlist/extreme.lua
index a71564b..a8fd882 100644
--- a/share/lua/playlist/extreme.lua
+++ b/share/lua/playlist/extreme.lua
@@ -34,14 +34,14 @@ end
 -- Probe function.
 function probe()
     return vlc.access == "http"
-        and string.match( vlc.path, "extreme.com/." )
-        or string.match( vlc.path, "freecaster.tv/." )
-        or string.match( vlc.path, "player.extreme.com/info/.")
+        and string.match( vlc.path, "extreme%.com/." )
+        or string.match( vlc.path, "freecaster%.tv/." )
+        or string.match( vlc.path, "player%.extreme%.com/info/.")
 end
 
 -- Parse function.
 function parse()
-    if (string.match( vlc.path, "extreme.com/." ) or string.match( vlc.path, "freecaster.tv/." )) and not string.match( vlc.path, "player.extreme.com/info/") then
+    if (string.match( vlc.path, "extreme%.com/." ) or string.match( vlc.path, "freecaster%.tv/." )) and not string.match( vlc.path, "player%.extreme%.com/info/") then
         while true do
             line = vlc.readline()
             if not line then break end
@@ -51,10 +51,10 @@ function parse()
                 break
             end
         end
-        return { { path = "http://player.extreme.com/info/" .. vid; name = "extreme.com video"; } }
+        return { { path = "http://player%.extreme%.com/info/" .. vid; name = "extreme%.com video"; } }
     end
 
-    if string.match( vlc.path, "player.extreme.com/info/." ) then
+    if string.match( vlc.path, "player%.extreme%.com/info/." ) then
         prefres = get_prefres()
         gostraight = true
         while true do
diff --git a/share/lua/playlist/katsomo.lua b/share/lua/playlist/katsomo.lua
index 85c3c41..6965e4e 100644
--- a/share/lua/playlist/katsomo.lua
+++ b/share/lua/playlist/katsomo.lua
@@ -57,7 +57,7 @@ function parse()
         then
             arturl = "http://www.katsomo.fi"..find( line, " src=\"(.-)\" alt=" )
         end
-        for treeid,name in string.gmatch( line, '/?treeId=(%d+)">([^<]+)</a') do
+        for treeid,name in string.gmatch( line, '/%?treeId=(%d+)">([^<]+)</a') do
             name = vlc.strings.resolve_xml_special_chars( name )
             name = vlc.strings.from_charset( "ISO_8859-1", name )
             path = "http://www.katsomo.fi/?treeId="..treeid
diff --git a/share/lua/playlist/mpora.lua b/share/lua/playlist/mpora.lua
index 81ffbcd..d48c1e6 100644
--- a/share/lua/playlist/mpora.lua
+++ b/share/lua/playlist/mpora.lua
@@ -23,7 +23,7 @@
 -- Probe function.
 function probe()
     return vlc.access == "http"
-        and string.match( vlc.path, "video.mpora.com/watch/" )
+        and string.match( vlc.path, "video%.mpora%.com/watch/" )
 end
 
 -- Parse function.
@@ -40,7 +40,7 @@ function parse()
             _,_,arturl = string.find( line, "image_src\" href=\"(.*)\" />" )
         end
         if string.match( line, "video_src" ) then
-            _,_,video = string.find( line, 'href="http://video.mpora.com/ep/(.*)%.swf" />' )
+            _,_,video = string.find( line, 'href="http://video%.mpora%.com/ep/(.*)%.swf" />' )
         end
 
     end
-- 
1.7.8.2




More information about the vlc-devel mailing list