From 75deae5f479738a58eec21ca1cb04be1a8492085 Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Wed, 20 Dec 2023 10:28:45 -0500 Subject: [PATCH] Update lastimport.py --- beetsplug/lastimport.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beetsplug/lastimport.py b/beetsplug/lastimport.py index 3ff166213..f59205b99 100644 --- a/beetsplug/lastimport.py +++ b/beetsplug/lastimport.py @@ -213,7 +213,11 @@ def process_tracks(lib, tracks, log): title = tracks[num]["name"].strip() if tracks[num]["name"] else None album = "" if "album" in tracks[num]: - album = tracks[num]["album"].get("name", "").strip() + album = ( + tracks[num]["album"].get("name", "").strip() + if tracks[num]["album"] + else None + ) log.debug("query: {0} - {1} ({2})", artist, title, album)