build 118 - оверлеи

This commit is contained in:
2026-08-26 13:17:08 +03:00
parent 2c9b0d4fcc
commit c5b25c23e2
8 changed files with 31383 additions and 36 deletions

View File

@@ -277,7 +277,7 @@ class VmixAgentHub:
text = re.sub(r"\s+", "", str(function_name or ""))
if text.lower() == "overlayinputalloff":
return ("all", "off")
match = re.search(r"OverlayInput([1-4])(In|Out|Off)?", text, flags=re.IGNORECASE)
match = re.search(r"OverlayInput([1-8])(In|Out|Off)?", text, flags=re.IGNORECASE)
if not match:
return None
raw = str(match.group(2) or "toggle").lower()
@@ -333,7 +333,7 @@ class VmixAgentHub:
def _runtime_overlay_payload(self, device_id: str) -> dict[str, Any]:
source = self._runtime_overlay_state.get(device_id, {})
overlays = {str(layer): dict(value) for layer, value in source.items() if str(layer) in {"1", "2", "3", "4"}}
overlays = {str(layer): dict(value) for layer, value in source.items() if str(layer) in {"1", "2", "3", "4", "5", "6", "7", "8"}}
authoritative = bool(getattr(self, "_runtime_overlay_authoritative", {}).get(device_id, False))
observed = str(getattr(self, "_runtime_overlay_observed_at", {}).get(device_id) or "")
return {
@@ -697,7 +697,7 @@ class VmixAgentHub:
async def receive_overlay_state(self, device_id: str, message: dict[str, Any]) -> None:
raw_overlays = message.get("overlays") if isinstance(message.get("overlays"), dict) else {}
next_state: dict[str, dict[str, str]] = {}
for layer in ("1", "2", "3", "4"):
for layer in ("1", "2", "3", "4", "5", "6", "7", "8"):
raw = raw_overlays.get(layer)
if raw is None:
raw = raw_overlays.get(int(layer))