- nombid_artists = self._cache.get('nombid_artists', [])
- match = get_close_matches(artist.name, nombid_artists, 50, 0.73)
+ if artist.mbid:
+ # we already performed a lookup on artists with mbid set
+ # search through remaining artists
+ artists = self._cache.get('nombid_artists', [])
+ else:
+ artists = self._cache.get('artists', [])
+ match = get_close_matches(artist.name, artists, 50, 0.73)