From 4d575787cd3ae8cf527bbf41e3de7572afd575b6 Mon Sep 17 00:00:00 2001 From: Ade Date: Thu, 24 Aug 2017 20:48:15 +1200 Subject: [PATCH] last.fm import fix Fixes #2753 --- headphones/lastfm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headphones/lastfm.py b/headphones/lastfm.py index 8f906d5f..db3e1aec 100644 --- a/headphones/lastfm.py +++ b/headphones/lastfm.py @@ -149,7 +149,10 @@ def getTagTopArtists(tag, limit=50): logger.debug("Fetched %d artists from Last.FM", len(artists)) for artist in artists: - artist_mbid = artist["mbid"] + try: + artist_mbid = artist["mbid"] + except KeyError: + continue if not any(artist_mbid in x for x in results): artistlist.append(artist_mbid)