From 067a3633d3c8d174dbd0eddbc474f06da671eb13 Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Fri, 28 Apr 2023 18:02:17 -0400 Subject: [PATCH] Change error handling --- beetsplug/fetchart.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 857d36c5c..bb4d1c7d5 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -902,14 +902,12 @@ class Spotify(RemoteArtSource): SPOTIFY_ALBUM_URL = 'https://open.spotify.com/album/' def get(self, album, plugin, paths): - if not len(album.mb_albumid) == 22 and \ - not album.data_source == 'Spotify': - return url = self.SPOTIFY_ALBUM_URL + album.mb_albumid try: response = requests.get(url) - except requests.RequestException: - self._log.debug('Spotify: error receiving response') + response.raise_for_status() + except requests.exceptions.HTTPError as e: + self._log.debug("Error: " + str(e)) return try: html = response.text