]> git.sesse.net Git - vlc/blob - share/http-lua/custom.lua
Mozilla : use \n
[vlc] / share / http-lua / custom.lua
1 local _G = _G
2 module("custom",package.seeall)
3
4 local dialogs_cache = {}
5
6 function dialog_preload(name)
7     if not dialogs_cache[name] then
8         -- Cache the dialogs
9         dialogs_cache[name] = process(http_dir.."/dialogs/"..name)
10     end
11 end
12
13 function dialog(name)
14     dialog_preload(name)
15     dialogs_cache[name]()
16 end
17
18 function dialogs(...)
19     for i=1,select("#",...) do
20         dialog(select(i,...))
21     end
22 end
23
24 _G.dialogs = dialogs
25 _G.vlm = vlc.vlm.new()