From 2abe7b47fd38823c93cba6b68dbc85c51f719349 Mon Sep 17 00:00:00 2001 From: David Inostroza Date: Thu, 23 Apr 2026 18:06:03 -0400 Subject: [PATCH] corrige nombre de playlists curadas: elimina fields= en llamada a API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El parĂ¡metro fields="name,description,images" causaba error en playlists curadas de Spotify (ej. "This Is ..."), haciendo que el nombre cayera al fallback con el spotify_id. Co-Authored-By: Claude Sonnet 4.6 --- app/routers/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 "", }