This commit is contained in:
2025-11-18 13:31:57 +03:00
parent 4001c70428
commit cb5ad666d9

View File

@@ -1,5 +1,6 @@
from fastapi import FastAPI, HTTPException, Request
from fastapi.responses import Response, HTMLResponse, StreamingResponse
from fastapi.staticfiles import StaticFiles
from contextlib import asynccontextmanager
import requests, uvicorn, json
import threading, queue
@@ -1397,7 +1398,8 @@ app = FastAPI(
redoc_url=None, # ❌ отключает /redoc
openapi_url=None, # ❌ отключает /openapi.json
)
# раздаём /shotmaps как статику из SHOTMAP_DIR
app.mount("/shotmaps", StaticFiles(directory=SHOTMAP_DIR), name="shotmaps")
def format_time(seconds: float | int) -> str:
"""
@@ -3459,7 +3461,7 @@ def get_image(points, bib, count_point):
logger.warning(f"[shotmap] не удалось сохранить {path}: {e}")
return ""
return f"https://{MYHOST}.tvstart.ru{path}"
return f"https://{MYHOST}.tvstart.ru{path.replace('/root/RFB', '')}"
if __name__ == "__main__":