mirror of
https://github.com/beetbox/beets.git
synced 2026-02-05 15:03:21 +01:00
error handling
This commit is contained in:
parent
014d41f208
commit
a027612216
1 changed files with 5 additions and 1 deletions
|
|
@ -76,7 +76,11 @@ class DeezerPlugin(MetadataSourcePlugin, BeetsPlugin):
|
|||
return None
|
||||
|
||||
album_data = requests.get(self.album_url + deezer_id).json()
|
||||
artist, artist_id = self.get_artist(album_data.get('contributors'))
|
||||
contributors = album_data.get('contributors')
|
||||
if contributors is not None:
|
||||
artist, artist_id = self.get_artist(contributors)
|
||||
else:
|
||||
artist, artist_id = None, None
|
||||
|
||||
release_date = album_data['release_date']
|
||||
date_parts = [int(part) for part in release_date.split('-')]
|
||||
|
|
|
|||
Loading…
Reference in a new issue