[vlc-commits] Lua: Allocine now uses keep_alive()
Jean-Philippe André
git at videolan.org
Sat Jan 22 00:56:48 CET 2011
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Tue Jan 18 22:16:01 2011 +0100| [713aa493fd5a28655d0be82965d806c385747b8f] | committer: Jean-Philippe André
Lua: Allocine now uses keep_alive()
This will prevent the watchdog window to pop up if the network is slow
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=713aa493fd5a28655d0be82965d806c385747b8f
---
share/lua/extensions/allocine-fr.lua | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/share/lua/extensions/allocine-fr.lua b/share/lua/extensions/allocine-fr.lua
index a1a8582..5276985 100644
--- a/share/lua/extensions/allocine-fr.lua
+++ b/share/lua/extensions/allocine-fr.lua
@@ -154,9 +154,11 @@ function click_chercher()
spin:stop()
return
end
+ vlc.keep_alive()
-- Fetch HTML data (max 65 kb)
local data = s:read(65535)
+ vlc.keep_alive()
-- Clean data
data = string.gsub(data, "<b>", "")
@@ -296,8 +298,11 @@ function open_fiche(url)
-- Open stream
local s = vlc.stream(url)
+ vlc.keep_alive()
+
-- Read max 500k (Note: 65k is not enough for the average note)
local data = s:read(500000)
+ vlc.keep_alive()
-- Buffer & temp variables
local first = nil
More information about the vlc-commits
mailing list