Edit to allow URL to be saved
This commit is contained in:
parent
54c4f9c093
commit
88619b30d4
|
@ -1833,9 +1833,12 @@ class Album(_Opus):
|
||||||
"""An album."""
|
"""An album."""
|
||||||
|
|
||||||
__hash__ = _Opus.__hash__
|
__hash__ = _Opus.__hash__
|
||||||
|
cover_image = None
|
||||||
def __init__(self, artist, title, network, username=None):
|
|
||||||
|
def __init__(self, artist, title, network, username=None, url=None):
|
||||||
super(Album, self).__init__(artist, title, network, "album", username)
|
super(Album, self).__init__(artist, title, network, "album", username)
|
||||||
|
if url:
|
||||||
|
self.cover_image = url
|
||||||
|
|
||||||
def get_release_date(self):
|
def get_release_date(self):
|
||||||
"""Returns the release date of the album."""
|
"""Returns the release date of the album."""
|
||||||
|
@ -1852,10 +1855,12 @@ class Album(_Opus):
|
||||||
COVER_MEDIUM
|
COVER_MEDIUM
|
||||||
COVER_SMALL
|
COVER_SMALL
|
||||||
"""
|
"""
|
||||||
|
if self.cover_image:
|
||||||
return _extract_all(
|
return self.cover_image
|
||||||
self._request(
|
else:
|
||||||
self.ws_prefix + ".getInfo", cacheable=True), 'image')[size]
|
return _extract_all(
|
||||||
|
self._request(
|
||||||
|
self.ws_prefix + ".getInfo", cacheable=True), 'image')[size]
|
||||||
|
|
||||||
def get_tracks(self):
|
def get_tracks(self):
|
||||||
"""Returns the list of Tracks on this album."""
|
"""Returns the list of Tracks on this album."""
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pylast",
|
name="pylast",
|
||||||
version="1.6.0",
|
version="1.6.1",
|
||||||
author="Amr Hassan <amr.hassan@gmail.com>",
|
author="Amr Hassan <amr.hassan@gmail.com>",
|
||||||
install_requires=['six'],
|
install_requires=['six'],
|
||||||
tests_require=['mock', 'pytest', 'coverage', 'pep8', 'pyyaml', 'pyflakes'],
|
tests_require=['mock', 'pytest', 'coverage', 'pep8', 'pyyaml', 'pyflakes'],
|
||||||
|
|
Loading…
Reference in a new issue