corrige nombre de playlists curadas: elimina fields= en llamada a API

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-23 18:06:03 -04:00
parent d47f6f4a52
commit 2abe7b47fd
+2 -2
View File
@@ -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 "",
}