From 2818a413f409515e76beefe9736ca0a9fd436a7c Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 10 Apr 2022 22:59:32 +0100 Subject: [PATCH] putting type check on album user scrobbles --- fmframework/net/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmframework/net/network.py b/fmframework/net/network.py index ff38ee1..e9c3800 100644 --- a/fmframework/net/network.py +++ b/fmframework/net/network.py @@ -346,7 +346,7 @@ class Network: mbid=album_dict.get('mbid', 'n/a'), listeners=int(album_dict.get('listeners', 0)), play_count=int(album_dict.get('playcount', 0)), - user_scrobbles=int(album_dict.get('userplaycount', 0)), + user_scrobbles=int(album_dict.get('userplaycount', 0) if album_dict.get('userplaycount', 0) is not dict else 0), wiki=self.parse_wiki(album_dict['wiki']) if album_dict.get('wiki', None) else None, artist=album_dict.get('artist'), images=[self.parse_image(i) for i in album_dict.get('image', [])])