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

14
app/routers/search.py Normal file
View File

@@ -0,0 +1,14 @@
from fastapi import APIRouter, Request, HTTPException
from fastapi.responses import JSONResponse
from app.services.tidal_wrapper import TidalWrapper
router = APIRouter(prefix="/search", tags=["search"])
@router.get("/")
async def search(query: str, type: str = "track"):
wrapper = TidalWrapper()
try:
results = wrapper.search(query, type)
return JSONResponse(results)
except Exception as e:
raise HTTPException(status_code=400, detail=str(e))