Store Album Art URLs when you call GetTopAlbums.

GetTopAlbums returns AlbumArt information alongside the TopAlbums.
We should store this in the Album() info variable, so we don't have to follow up with an additional GetInfo() call if we want the Album Art.

Signed-off-by: Paddez <dave@paddez.com>
This commit is contained in:
Paddez 2019-06-22 11:04:09 +01:00
parent 46e4c0ec4c
commit 7694de346e
2 changed files with 8 additions and 1 deletions

View file

@ -2896,8 +2896,9 @@ def _extract_top_albums(doc, network):
name = _extract(node, "name")
artist = _extract(node, "name", 1)
playcount = _extract(node, "playcount")
info = {"image": _extract_all(node, "image")}
seq.append(TopItem(Album(artist, name, network), playcount))
seq.append(TopItem(Album(artist, name, network, info=info), playcount))
return seq