WebHost: Refactor tracker.py, removal of dead code, and tweaks to layouts of some tracker pages. (#2438)

This commit is contained in:
Zach Parks
2023-11-18 12:29:35 -06:00
committed by GitHub
parent 185a519248
commit 790f192ded
22 changed files with 2915 additions and 2203 deletions

View File

@@ -27,8 +27,10 @@ from .models import Command, GameDataPackage, Room, db
class CustomClientMessageProcessor(ClientMessageProcessor):
ctx: WebHostContext
def _cmd_video(self, platform, user):
"""Set a link for your name in the WebHostLib tracker pointing to a video stream"""
def _cmd_video(self, platform: str, user: str):
"""Set a link for your name in the WebHostLib tracker pointing to a video stream.
Currently, only YouTube and Twitch platforms are supported.
"""
if platform.lower().startswith("t"): # twitch
self.ctx.video[self.client.team, self.client.slot] = "Twitch", user
self.ctx.save()