From fa822d6ab2c9ea6ac1032ecd8104061e77ca70fc Mon Sep 17 00:00:00 2001 From: Alok Saboo Date: Thu, 25 May 2023 13:55:57 -0400 Subject: [PATCH] Add a check for valid data --- beetsplug/spotify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py index c14e348ba..0ada97e8b 100644 --- a/beetsplug/spotify.py +++ b/beetsplug/spotify.py @@ -219,7 +219,9 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin): album_data = self._handle_response( requests.get, self.album_url + spotify_id ) - self._log.debug('Album data: {}', album_data) + if album_data['name'] == "": + self._log.debug("Album removed from Spotify: {}", album_id) + return None artist, artist_id = self.get_artist(album_data['artists']) date_parts = [