mirror of
https://github.com/Kunsi/scheduled-plugin-pretalx-broadcast-tools.git
synced 2024-11-25 03:21:05 +00:00
for now, use time provided by the info-beamer api
This commit is contained in:
parent
8be1da1b9f
commit
8122666857
2 changed files with 4 additions and 8 deletions
6
service
6
service
|
@ -19,12 +19,13 @@ def log(msg):
|
||||||
def idle(seconds, event_start, event_tz):
|
def idle(seconds, event_start, event_tz):
|
||||||
end = time.time() + seconds
|
end = time.time() + seconds
|
||||||
log("sleeping for {} seconds".format(seconds))
|
log("sleeping for {} seconds".format(seconds))
|
||||||
|
timezone = pytz.timezone(event_tz)
|
||||||
while time.time() < end:
|
while time.time() < end:
|
||||||
send_data = {
|
send_data = {
|
||||||
'day': '??',
|
'day': '??',
|
||||||
|
'time': time.time()
|
||||||
}
|
}
|
||||||
if event_start is not None:
|
if event_start is not None:
|
||||||
timezone = pytz.timezone(event_tz)
|
|
||||||
event_now = datetime.now(timezone)
|
event_now = datetime.now(timezone)
|
||||||
utc_now = datetime.now(pytz.utc)
|
utc_now = datetime.now(pytz.utc)
|
||||||
|
|
||||||
|
@ -43,9 +44,6 @@ def idle(seconds, event_start, event_tz):
|
||||||
log("NOW: {}".format(event_now.isoformat()))
|
log("NOW: {}".format(event_now.isoformat()))
|
||||||
|
|
||||||
send_data['day'] = day_info.days
|
send_data['day'] = day_info.days
|
||||||
send_data['time'] = int(time.time() + utc_offset)
|
|
||||||
else:
|
|
||||||
send_data['time'] = time.time()
|
|
||||||
|
|
||||||
for k,v in send_data.items():
|
for k,v in send_data.items():
|
||||||
node.send_raw('root/plugin/pretalx/{}:{}'.format(k, v))
|
node.send_raw('root/plugin/pretalx/{}:{}'.format(k, v))
|
||||||
|
|
6
tile.lua
6
tile.lua
|
@ -15,7 +15,7 @@ local all_next_talks = {}
|
||||||
local room_next_talks = {}
|
local room_next_talks = {}
|
||||||
local current_room
|
local current_room
|
||||||
local day = 0
|
local day = 0
|
||||||
local time = 1695989869
|
local time = 0
|
||||||
local show_language = true
|
local show_language = true
|
||||||
local show_track = true
|
local show_track = true
|
||||||
|
|
||||||
|
@ -83,10 +83,8 @@ local function wrap(str, font, size, max_w)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function check_next_talks()
|
local function check_next_talks()
|
||||||
|
time = api.clock.unix()
|
||||||
log("time is now " .. time)
|
log("time is now " .. time)
|
||||||
if time == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
room_next_talks = {}
|
room_next_talks = {}
|
||||||
all_next_talks = {}
|
all_next_talks = {}
|
||||||
|
|
Loading…
Reference in a new issue