Add desktop ready checks, smarter chat scrolling, and fight-night reactions

This commit is contained in:
Peter Stockings
2026-10-05 15:46:55 +11:00
parent 19576de166
commit f3eeda71e6
13 changed files with 1228 additions and 10 deletions
+11
View File
@@ -6,6 +6,9 @@ HELP_TEXT = """
• <b>/seek [time]</b> - Seek (e.g., 1:23, +30s, -1m)<br>
• <b>/tag [now|time] [name]</b> - Create a highlight<br>
• <b>/time</b> - Show current timestamp<br>
• <b>/ready</b> - Ask everyone if they are ready to watch<br>
• <b>/ko</b>, <b>/bell</b>, <b>/tap</b> - Fight-night reactions<br>
• <b>/robbery</b> - React and open a room vote on the decision<br>
• <b>/help</b> - Show this message<br><br>
<b>Keyboard Shortcuts:</b><br>
• <b>Space</b>: Play/Pause<br>
@@ -52,6 +55,14 @@ def parse_time_arg(arg: str, current_ms: int, length_ms: int):
def handle_chat_command(cmd: str, parts: list, widget):
"""Handle a slash command. Returns True if the command was handled."""
if cmd in ("/ko", "/bell", "/tap", "/robbery"):
widget.fight_action_requested.emit({"type": "reaction", "kind": cmd[1:]})
return True
if cmd == "/ready":
widget.ready_action_requested.emit({"type": "ready_check", "action": "begin"})
return True
if cmd == "/play":
if not widget.vlc_player.is_playing:
widget.toggle_playback()