JSON parse
Build and Push Docker Image / build-and-push (push) Successful in 15s

This commit is contained in:
ciomek committed 2026-08-16 13:23:26 +02:00
1 parent d38015562a
commit 8fbc7fed7d
8 files changed
+10 -29

No files matched your search

+1 -6
View File
@@ -62,7 +62,7 @@ def get_random(templates, **kwargs):
return random.choice(templates).format(**kwargs)
async def marquee_handler(client, userdata, msg):
async def marquee_handler(client, userdata, msg, data):
prefix = "loon/player/"
if not msg.topic.startswith(prefix):
@@ -74,11 +74,6 @@ async def marquee_handler(client, userdata, msg):
if subtopic not in PLAYER_EVENT_SUFFIXES:
return
try:
data = json.loads(msg.payload.decode())
except json.JSONDecodeError:
return
player = data.get("player")
if not isinstance(player, dict):
return