From e2f0b5614635fc62bc64a26c495bd20049c0b8f9 Mon Sep 17 00:00:00 2001 From: Alexis Raphaeloff Date: Wed, 8 May 2024 17:37:16 +0200 Subject: [PATCH] prevent error if playlist has no image --- spotdl/types/playlist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotdl/types/playlist.py b/spotdl/types/playlist.py index c2bc3f491..b37042821 100644 --- a/spotdl/types/playlist.py +++ b/spotdl/types/playlist.py @@ -64,7 +64,7 @@ def get_metadata(url: str) -> Tuple[Dict[str, Any], List[Song]]: else i["width"] * i["height"] ), )["url"] - if (len(playlist["images"]) > 0) + if (playlist.get("images") is not None and len(playlist["images"]) > 0) else "" ), }