From 99c295b0e499e207333d8fc39af21101ba5b75cc Mon Sep 17 00:00:00 2001 From: krateng Date: Sat, 20 May 2023 21:28:05 +0200 Subject: [PATCH] Fixed handling of empty album name --- maloja/database/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maloja/database/__init__.py b/maloja/database/__init__.py index fcdb861..8969ea1 100644 --- a/maloja/database/__init__.py +++ b/maloja/database/__init__.py @@ -160,6 +160,7 @@ def rawscrobble_to_scrobbledict(rawscrobble, fix=True, client=None): # New plan, do this further down # NONE always means there is simply no info, so make a guess or whatever the options say + # could use the track artists, but probably check if any album with the same name exists first # various artists always needs to be specified via [] # TODO @@ -185,7 +186,7 @@ def rawscrobble_to_scrobbledict(rawscrobble, fix=True, client=None): "rawscrobble":rawscrobble } - if scrobbledict["track"]["album"]["albumtitle"] is None: + if not scrobbledict["track"]["album"]["albumtitle"]: del scrobbledict["track"]["album"] return scrobbledict