From f54ab12408753882a2a66cf4d53a70ac70690a65 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Thu, 28 May 2026 17:23:35 -0300 Subject: [PATCH] Guard playParams access to avoid KeyError --- gamdl/interface/song.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamdl/interface/song.py b/gamdl/interface/song.py index a0765f2..6ea49ff 100644 --- a/gamdl/interface/song.py +++ b/gamdl/interface/song.py @@ -506,7 +506,7 @@ class AppleMusicSongInterface: ) )["data"][0] - if media.media_metadata["attributes"]["playParams"].get("isLibrary"): + if media.media_metadata["attributes"].get("playParams", {}).get("isLibrary"): catalog_metadata = self.base.get_catalog_metadata_from_library( media.media_metadata )