Replaced deprecated COVER_ constants with SIZE_
This commit is contained in:
parent
0d98c3590f
commit
35f67a09cb
|
@ -86,11 +86,11 @@ DOMAIN_RUSSIAN = 9
|
||||||
DOMAIN_JAPANESE = 10
|
DOMAIN_JAPANESE = 10
|
||||||
DOMAIN_CHINESE = 11
|
DOMAIN_CHINESE = 11
|
||||||
|
|
||||||
COVER_SMALL = 0
|
SIZE_SMALL = COVER_SMALL = 0
|
||||||
COVER_MEDIUM = 1
|
SIZE_MEDIUM = COVER_MEDIUM = 1
|
||||||
COVER_LARGE = 2
|
SIZE_LARGE = COVER_LARGE = 2
|
||||||
COVER_EXTRA_LARGE = 3
|
SIZE_EXTRA_LARGE = COVER_EXTRA_LARGE = 3
|
||||||
COVER_MEGA = 4
|
SIZE_MEGA = COVER_MEGA = 4
|
||||||
|
|
||||||
IMAGES_ORDER_POPULARITY = "popularity"
|
IMAGES_ORDER_POPULARITY = "popularity"
|
||||||
IMAGES_ORDER_DATE = "dateadded"
|
IMAGES_ORDER_DATE = "dateadded"
|
||||||
|
@ -1468,14 +1468,14 @@ class Album(_Opus):
|
||||||
def __init__(self, artist, title, network, username=None):
|
def __init__(self, artist, title, network, username=None):
|
||||||
super(Album, self).__init__(artist, title, network, "album", username)
|
super(Album, self).__init__(artist, title, network, "album", username)
|
||||||
|
|
||||||
def get_cover_image(self, size=COVER_EXTRA_LARGE):
|
def get_cover_image(self, size=SIZE_EXTRA_LARGE):
|
||||||
"""
|
"""
|
||||||
Returns a uri to the cover image
|
Returns a uri to the cover image
|
||||||
size can be one of:
|
size can be one of:
|
||||||
COVER_EXTRA_LARGE
|
SIZE_EXTRA_LARGE
|
||||||
COVER_LARGE
|
SIZE_LARGE
|
||||||
COVER_MEDIUM
|
SIZE_MEDIUM
|
||||||
COVER_SMALL
|
SIZE_SMALL
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return _extract_all(
|
return _extract_all(
|
||||||
|
@ -1575,15 +1575,15 @@ class Artist(_BaseObject, _Taggable):
|
||||||
return _extract(
|
return _extract(
|
||||||
self._request(self.ws_prefix + ".getCorrection"), "name")
|
self._request(self.ws_prefix + ".getCorrection"), "name")
|
||||||
|
|
||||||
def get_cover_image(self, size=COVER_MEGA):
|
def get_cover_image(self, size=SIZE_MEGA):
|
||||||
"""
|
"""
|
||||||
Returns a uri to the cover image
|
Returns a uri to the cover image
|
||||||
size can be one of:
|
size can be one of:
|
||||||
COVER_MEGA
|
SIZE_MEGA
|
||||||
COVER_EXTRA_LARGE
|
SIZE_EXTRA_LARGE
|
||||||
COVER_LARGE
|
SIZE_LARGE
|
||||||
COVER_MEDIUM
|
SIZE_MEDIUM
|
||||||
COVER_SMALL
|
SIZE_SMALL
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return _extract_all(
|
return _extract_all(
|
||||||
|
@ -2409,14 +2409,14 @@ class User(_BaseObject, _Chartable):
|
||||||
return self._get_things(
|
return self._get_things(
|
||||||
"getTopTracks", "track", Track, params, cacheable)
|
"getTopTracks", "track", Track, params, cacheable)
|
||||||
|
|
||||||
def get_image(self, size=COVER_EXTRA_LARGE):
|
def get_image(self, size=SIZE_EXTRA_LARGE):
|
||||||
"""
|
"""
|
||||||
Returns the user's avatar
|
Returns the user's avatar
|
||||||
size can be one of:
|
size can be one of:
|
||||||
COVER_EXTRA_LARGE
|
SIZE_EXTRA_LARGE
|
||||||
COVER_LARGE
|
SIZE_LARGE
|
||||||
COVER_MEDIUM
|
SIZE_MEDIUM
|
||||||
COVER_SMALL
|
SIZE_SMALL
|
||||||
"""
|
"""
|
||||||
|
|
||||||
doc = self._request(self.ws_prefix + ".getInfo", True)
|
doc = self._request(self.ws_prefix + ".getInfo", True)
|
||||||
|
|
Loading…
Reference in a new issue