releases do not have title
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2b1650b36e
commit
e81c50a4b1
@ -51,7 +51,7 @@ class APIInteractionResource(UserStoreResource):
|
|||||||
else:
|
else:
|
||||||
return spotify_uri, None, None
|
return spotify_uri, None, None
|
||||||
|
|
||||||
def getcoverimage(self, releaseid: str, itemtype: str, title: str, artist: str,
|
def getcoverimage(self, releaseid: str, itemtype: str, artist: str, title: str = "",
|
||||||
album: str = "") -> tuple:
|
album: str = "") -> tuple:
|
||||||
if itemtype != "recording" and itemtype != "release":
|
if itemtype != "recording" and itemtype != "release":
|
||||||
return None, None
|
return None, None
|
||||||
@ -70,7 +70,7 @@ class APIInteractionResource(UserStoreResource):
|
|||||||
if 'artist-credit' in currrelease and currrelease['artist-credit']:
|
if 'artist-credit' in currrelease and currrelease['artist-credit']:
|
||||||
retdata['artist'] = currrelease['artist-credit'][0]['artist']['name']
|
retdata['artist'] = currrelease['artist-credit'][0]['artist']['name']
|
||||||
retdata['cover_url'], retdata['cover_url_small'] = self.getcoverimage(
|
retdata['cover_url'], retdata['cover_url_small'] = self.getcoverimage(
|
||||||
itemid, 'release', title=retdata['title'], album=retdata.get('album'),
|
itemid, 'release', album=retdata.get('album'),
|
||||||
artist=retdata.get('artist'))
|
artist=retdata.get('artist'))
|
||||||
retdata['spotify_id'], _, _ = \
|
retdata['spotify_id'], _, _ = \
|
||||||
self.queryspotifyinfo('release', title=retdata['title'])
|
self.queryspotifyinfo('release', title=retdata['title'])
|
||||||
|
Loading…
Reference in New Issue
Block a user