апдейт

This commit is contained in:
2026-05-08 12:56:10 +03:00
parent 5fb6189b2d
commit 0ede5beb6b
3 changed files with 19 additions and 5 deletions

View File

@@ -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) live = soup.find("section", class_=lambda c: c and "game--live" in c)
if live: if live:
return {"status": "live", "home_score": home, "away_score": away} return {"status": "live", "home_score": home, "away_score": away}
else: elif not live and home and away:
if home and away:
return {"status": "finished", "home_score": home, "away_score": 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'ОВ # ЛОГИКА ЗАПУСКА WATCHER'ОВ

View File

@@ -15,7 +15,7 @@ from repositories.auth_repository import (
revoke_auth_session, revoke_auth_session,
) )
IDLE_TIMEOUT_SECONDS = 2 * 60 * 60 IDLE_TIMEOUT_SECONDS = 99999
SESSION_TOUCH_THROTTLE_SECONDS = 60 SESSION_TOUCH_THROTTLE_SECONDS = 60
PBKDF2_ITERATIONS = 260_000 PBKDF2_ITERATIONS = 260_000

View File

@@ -2338,6 +2338,8 @@ function buildVmixCommandsFromFormation(side) {
const players = Array.isArray(formationState[side]) ? formationState[side] : []; const players = Array.isArray(formationState[side]) ? formationState[side] : [];
const commands = []; const commands = [];
const playerPrefix = side === "home" ? "HOME" : "AWAY"; const playerPrefix = side === "home" ? "HOME" : "AWAY";
const inputName = side === "home" ? "РАССТАНОВКА - ХОЗЯЕВА" : "РАССТАНОВКА - ГОСТИ";
if (players.length < 2) { if (players.length < 2) {
return []; return [];
@@ -2351,6 +2353,19 @@ function buildVmixCommandsFromFormation(side) {
const x = convertPitchXToPan(player.x).toFixed(3); const x = convertPitchXToPan(player.x).toFixed(3);
const y = convertPitchYToPan(player.y).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( commands.push(
vmixCmd(`Function=SetPanX&Input=${encodeURIComponent(playerInputName)}&Value=${x}`) vmixCmd(`Function=SetPanX&Input=${encodeURIComponent(playerInputName)}&Value=${x}`)
); );