From 0ede5beb6b3c02a27b80d925d0082f38a750e3bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Fri, 8 May 2026 12:56:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B0=D0=BF=D0=B4=D0=B5=D0=B9=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scheduler.py | 7 +++---- services/auth_service.py | 2 +- static/script.js | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/scheduler.py b/scheduler.py index a879ee7..4b9ab90 100644 --- a/scheduler.py +++ b/scheduler.py @@ -217,11 +217,10 @@ def fetch_match_live_data(match_id: int) -> dict: live = soup.find("section", class_=lambda c: c and "game--live" in c) if live: return {"status": "live", "home_score": home, "away_score": away} - else: - if home and away: - return {"status": "finished", "home_score": home, "away_score": away} + elif not live and home and away: + return {"status": "finished", "home_score": home, "away_score": away} - # return {"status": "scheduled", "home_score": home, "away_score": away} + return {"status": "scheduled", "home_score": home, "away_score": away} # ========================================================= # ЛОГИКА ЗАПУСКА WATCHER'ОВ diff --git a/services/auth_service.py b/services/auth_service.py index c4b3978..231bdb1 100644 --- a/services/auth_service.py +++ b/services/auth_service.py @@ -15,7 +15,7 @@ from repositories.auth_repository import ( revoke_auth_session, ) -IDLE_TIMEOUT_SECONDS = 2 * 60 * 60 +IDLE_TIMEOUT_SECONDS = 99999 SESSION_TOUCH_THROTTLE_SECONDS = 60 PBKDF2_ITERATIONS = 260_000 diff --git a/static/script.js b/static/script.js index 961d693..263c3e5 100644 --- a/static/script.js +++ b/static/script.js @@ -2338,6 +2338,8 @@ function buildVmixCommandsFromFormation(side) { const players = Array.isArray(formationState[side]) ? formationState[side] : []; const commands = []; const playerPrefix = side === "home" ? "HOME" : "AWAY"; + const inputName = side === "home" ? "РАССТАНОВКА - ХОЗЯЕВА" : "РАССТАНОВКА - ГОСТИ"; + if (players.length < 2) { return []; @@ -2351,6 +2353,19 @@ function buildVmixCommandsFromFormation(side) { const x = convertPitchXToPan(player.x).toFixed(3); const y = convertPitchYToPan(player.y).toFixed(3); + + for (let i = 1; i <= 10; i++) { + commands.push( + vmixCmd(`Function=ResetInput&Input=${encodeURIComponent(`${playerPrefix} - Игрок${i}`)}`) + ); + }; + + commands.push( + vmixCmd(`Function=ResetInput&Input=${encodeURIComponent(inputName)}`) + ); + + + commands.push( vmixCmd(`Function=SetPanX&Input=${encodeURIComponent(playerInputName)}&Value=${x}`) );