Store all images on get_cover_image for future use

This commit is contained in:
Hugo 2018-04-14 22:50:42 +03:00
parent cf2d9113dd
commit 4083f72ef7

View file

@ -732,6 +732,7 @@ class _Request(object):
"""Representing an abstract web service operation.""" """Representing an abstract web service operation."""
def __init__(self, network, method_name, params=None): def __init__(self, network, method_name, params=None):
print(method_name)
if params is None: if params is None:
params = {} params = {}
@ -1501,10 +1502,9 @@ class Album(_Opus):
SIZE_SMALL SIZE_SMALL
""" """
if not self.images: if not self.images:
return _extract_all( self.images = _extract_all(
self._request(self.ws_prefix + ".getInfo", cacheable=True), self._request(self.ws_prefix + ".getInfo", cacheable=True),
'image')[size] 'image')
else:
return self.images[size] return self.images[size]
def get_tracks(self): def get_tracks(self):