This commit is contained in:
2025-12-02 20:16:14 +01:00
parent b0c017ca91
commit d5169fbec7
6 changed files with 284 additions and 3 deletions

View File

@@ -12,3 +12,13 @@ async def search(query: str, type: str = "track"):
return JSONResponse(results)
except Exception as e:
raise HTTPException(status_code=400, detail=str(e))
@router.get("/artist/{artist_id}/albums")
async def get_artist_albums(artist_id: str):
wrapper = TidalWrapper()
try:
albums = wrapper.get_artist_albums(artist_id)
return JSONResponse(albums)
except Exception as e:
raise HTTPException(status_code=400, detail=str(e))