mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2025-06-30 22:58:32 +00:00
implement data triggers
Turns out, my code was right the whole time, but the scheduled-player package was not updated.
This commit is contained in:
parent
d3660931fb
commit
48a72a2757
2 changed files with 10 additions and 2 deletions
10
tile.lua
10
tile.lua
|
@ -31,6 +31,11 @@ end
|
|||
|
||||
function M.data_trigger(path, data)
|
||||
log("received data '" .. data .. "' on " .. path)
|
||||
if path == "day" then
|
||||
day = tonumber(data)
|
||||
elseif path == "time" then
|
||||
time = tonumber(data)
|
||||
end
|
||||
end
|
||||
|
||||
function M.updated_config_json(config)
|
||||
|
@ -83,8 +88,11 @@ local function wrap(str, font, size, max_w)
|
|||
end
|
||||
|
||||
local function check_next_talks()
|
||||
time = api.clock.unix()
|
||||
log("time is now " .. time)
|
||||
if time == 0 then
|
||||
log("No time info yet, cannot check for next talks")
|
||||
return
|
||||
end
|
||||
|
||||
room_next_talks = {}
|
||||
all_next_talks = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue