This commit is contained in:
1 parent
d38015562a
commit
8fbc7fed7d
8 files changed
+10
-29
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user