support all kinds of node names

This commit is contained in:
Franzi 2023-09-30 13:52:06 +02:00
parent 80777081c3
commit aba29ffa52
2 changed files with 4 additions and 6 deletions

View file

@ -7,10 +7,6 @@ pretalx installation!
[Import this package to info-beamer.com](https://info-beamer.com/use?url=https%3A%2F%2Fgithub.com%2FKunsi%2Fscheduled-plugin-pretalx-broadcast-tools.git) [Import this package to info-beamer.com](https://info-beamer.com/use?url=https%3A%2F%2Fgithub.com%2FKunsi%2Fscheduled-plugin-pretalx-broadcast-tools.git)
It's important that you import this plugin under one of the paths
`pretalx` or `pretalx-broadcast-tools` into your setup. Otherwise
no information will be shown!
## Features ## Features
* show the next talk in the configured room * show the next talk in the configured room

View file

@ -1,4 +1,5 @@
#!/usr/bin/python #!/usr/bin/python
import os
import sys import sys
import time import time
import traceback import traceback
@ -11,6 +12,8 @@ from hosted import config, node
config.restart_on_update() config.restart_on_update()
SEND_PREFIX = os.environ["NODE"].replace("root/", "root/plugin/")
def log(msg): def log(msg):
sys.stderr.write("[pretalx] {}\n".format(msg)) sys.stderr.write("[pretalx] {}\n".format(msg))
@ -39,8 +42,7 @@ def idle(seconds, event_start, event_tz):
send_data["day"] = day_info.days send_data["day"] = day_info.days
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("{}/{}:{}".format(SEND_PREFIX, k, v))
node.send_raw("root/plugin/pretalx-broadcast-tools/{}:{}".format(k, v))
time.sleep(1) time.sleep(1)