fix album retrieval in /cover
This commit is contained in:
parent
59763c308e
commit
31f31d07d0
1 changed files with 4 additions and 4 deletions
|
|
@ -78,10 +78,10 @@ def setup(bot: bot.Bot):
|
|||
user = bot.lastfm.get_user(username)
|
||||
|
||||
if not user.get_now_playing:
|
||||
last_played = user.get_recent_tracks(limit=1)
|
||||
albumobj = last_played[0].get_album()
|
||||
else:
|
||||
albumobj = user.get_now_playing().get_album()
|
||||
last_played = user.get_recent_tracks(limit=1, cacheable=False)
|
||||
albumobj = last_played[0].track.get_album()
|
||||
|
||||
else: albumobj = user.get_now_playing().get_album()
|
||||
|
||||
cover_art = albumobj.get_cover_image()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue