Update spotify.py

This commit is contained in:
Alok Saboo 2023-11-11 21:02:52 -05:00
parent 6cda741143
commit 86daa0111c

View file

@ -242,6 +242,7 @@ 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
@ -359,6 +360,7 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin):
track_data = self._handle_response(
requests.get, self.track_url + spotify_id
)
self._log.debug("track_data: {}", track_data)
track = self._get_track(track_data)
# Get album's tracks to set `track.index` (position on the entire