This commit is contained in:
2025-12-02 14:07:35 +01:00
commit 9b84566eb4
62 changed files with 12861 additions and 0 deletions

23
app/main.py Normal file
View File

@@ -0,0 +1,23 @@
from fastapi import FastAPI, Request
from fastapi.staticfiles import StaticFiles
from fastapi.templating import Jinja2Templates
from fastapi.responses import HTMLResponse
from app.routers import auth, search, download, system
from app.services.tidal_wrapper import TidalWrapper
app = FastAPI(title="Tidal DL Web")
app.mount("/static", StaticFiles(directory="app/static"), name="static")
templates = Jinja2Templates(directory="app/templates")
app.include_router(auth.router)
app.include_router(search.router)
app.include_router(download.router)
app.include_router(system.router)
@app.get("/", response_class=HTMLResponse)
async def index(request: Request):
wrapper = TidalWrapper()
if not wrapper.is_authenticated():
return templates.TemplateResponse("login.html", {"request": request})
return templates.TemplateResponse("index.html", {"request": request})