added error handling

This commit is contained in:
Alok Saboo 2023-05-26 08:40:15 -04:00
parent 0f1add8b02
commit 7a9d8f9752

View file

@ -956,7 +956,11 @@ class Spotify(RemoteArtSource):
return HAS_BEAUTIFUL_SOUP
def get(self, album, plugin, paths):
url = self.SPOTIFY_ALBUM_URL + album.items().get().spotify_album_id
try:
url = self.SPOTIFY_ALBUM_URL + album.items().get().spotify_album_id
except AttributeError:
self._log.debug('Fetchart: no Spotify album ID found')
return
try:
response = requests.get(url)
response.raise_for_status()