diff --git a/app/routers/admin.py b/app/routers/admin.py index e455d89..4ff71b8 100644 --- a/app/routers/admin.py +++ b/app/routers/admin.py @@ -45,9 +45,9 @@ def _extract_spotify_item(value: str) -> tuple[str, str] | None: def _fetch_metadata(sp, spotify_id: str, spotify_type: str) -> dict: if spotify_type == "playlist": - data = sp.playlist(spotify_id, fields="name,description,images") + data = sp.playlist(spotify_id) return { - "name": data["name"], + "name": data.get("name") or spotify_id, "description": data.get("description") or "", "image_url": data["images"][0]["url"] if data.get("images") else "", }