Commit 713aa493 authored by Jean-Philippe André's avatar Jean-Philippe André

Lua: Allocine now uses keep_alive()

This will prevent the watchdog window to pop up if the network is slow
parent 5980be37
...@@ -154,9 +154,11 @@ function click_chercher() ...@@ -154,9 +154,11 @@ function click_chercher()
spin:stop() spin:stop()
return return
end end
vlc.keep_alive()
-- Fetch HTML data (max 65 kb) -- Fetch HTML data (max 65 kb)
local data = s:read(65535) local data = s:read(65535)
vlc.keep_alive()
-- Clean data -- Clean data
data = string.gsub(data, "<b>", "") data = string.gsub(data, "<b>", "")
...@@ -296,8 +298,11 @@ function open_fiche(url) ...@@ -296,8 +298,11 @@ function open_fiche(url)
-- Open stream -- Open stream
local s = vlc.stream(url) local s = vlc.stream(url)
vlc.keep_alive()
-- Read max 500k (Note: 65k is not enough for the average note) -- Read max 500k (Note: 65k is not enough for the average note)
local data = s:read(500000) local data = s:read(500000)
vlc.keep_alive()
-- Buffer & temp variables -- Buffer & temp variables
local first = nil local first = nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment