]> git.sesse.net Git - vlc/commitdiff
Lua: Allocine now uses keep_alive()
authorJean-Philippe André <jpeg@videolan.org>
Tue, 18 Jan 2011 21:16:01 +0000 (22:16 +0100)
committerJean-Philippe André <jpeg@videolan.org>
Fri, 21 Jan 2011 23:42:09 +0000 (00:42 +0100)
This will prevent the watchdog window to pop up if the network is slow

share/lua/extensions/allocine-fr.lua

index a1a8582499552438e93812cde2aea16b1db621ee..5276985a546f2e282e489d1cca25a5aed17403c2 100644 (file)
@@ -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