vlc/vlc-2.0.3-lua-5.2.patch

132 lines
5.8 KiB
Diff
Raw Normal View History

From a957114421fd2e875432e5fde0448ffc1ae60cfd Mon Sep 17 00:00:00 2001
From: Kelly Anderson <kelly@silka.with-linux.com>
Date: Thu, 5 Jan 2012 06:23:35 -0700
Subject: [PATCH] Cleanup lua script escape sequences for lua 5.2.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Converting \ to %, since 5.2 no longer accepts \.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
---
share/lua/extensions/imdb.lua | 2 +-
share/lua/playlist/appletrailers.lua | 6 +++---
share/lua/playlist/extreme.lua | 10 +++++-----
share/lua/playlist/katsomo.lua | 2 +-
share/lua/playlist/mpora.lua | 4 ++--
share/lua/playlist/pinkbike.lua | 4 ++--
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua
index 8bd4bea..4d0f5e7 100644
--- a/share/lua/playlist/appletrailers.lua
+++ b/share/lua/playlist/appletrailers.lua
@@ -67,7 +67,7 @@ function parse()
description = find( line, "h%d.->(.-)</h%d") .. ' '
end
if string.match( line, 'img src=') then
- for img in string.gmatch(line, '<img src="(http://.*\.jpg)" ') do
+ for img in string.gmatch(line, '<img src="(http://.*%.jpg)" ') do
art_url = img
end
for i,value in pairs(playlist) do
@@ -76,8 +76,8 @@ function parse()
else break end
end
end
- if string.match( line, "class=\"hd\".-\.mov") then
- for urlline,resolution in string.gmatch(line, "class=\"hd\".-href=\"(.-.mov)\".-(%d+.-p)") do
+ if string.match( line, 'class="hd".-%.mov') then
+ for urlline,resolution in string.gmatch(line, 'class="hd".-href="(.-%.mov)".-(%d+.-p)') do
urlline = string.gsub( urlline, "_"..resolution, "_h"..resolution )
table.insert( playlist, { path = urlline,
name = description .. '(' .. resolution .. ')',
diff --git a/share/lua/playlist/extreme.lua b/share/lua/playlist/extreme.lua
index 6fd7251..f5949ce 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
@@ -54,7 +54,7 @@ function parse()
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 bf461c7..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 cfee5d0..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
diff --git a/share/lua/playlist/pinkbike.lua b/share/lua/playlist/pinkbike.lua
index 06105d7..f6787c8 100644
--- a/share/lua/playlist/pinkbike.lua
+++ b/share/lua/playlist/pinkbike.lua
@@ -45,10 +45,10 @@ function parse()
end
-- Try to find server which has our video
if string.match( line, "<link rel=\"videothumbnail\" href=\"http://(.*)/vt/svt-") then
- _,_,server = string.find (line, "<link rel=\"videothumbnail\"\ href=\"http://(.*)/vt/svt-" )
+ _,_,server = string.find (line, '<link rel="videothumbnail" href="http://(.*)/vt/svt-' )
end
if string.match( line, "<link rel=\"videothumbnail\" href=\"(.*)\" type=\"image/jpeg\"") then
- _,_,arturl = string.find (line, "<link rel=\"videothumbnail\" href=\"(.*)\"\ type=\"image/jpeg\"")
+ _,_,arturl = string.find (line, '<link rel="videothumbnail" href="(.*)" type="image/jpeg"')
end
end
--
1.7.10