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}`) );