Documentation for Album¤
AlbumBase defines the interface of the Album class, which is subclassing it.
artist: Artist property readonly ¤
Return the album's artist.
Returns:
| Type | Description |
|---|---|
Artist | Artist: an instance of |
tracks: Iterator[Track] property readonly ¤
Return the album tracks.
Yields
Iterator["Track"]: the album tracks
url: ~AnyStr property readonly ¤
Return the album's Spotify URL.
Returns:
| Type | Description |
|---|---|
~AnyStr | AnyStr: the URL in string format |
from_url(cls, url) classmethod ¤
Return an Album given its corresponding Spotify URL.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
url | ~AnyStr | the Spotify URL of the album | required |
Returns:
| Type | Description |
|---|---|
Album | Album: the corresponding album |
Album implements the album downloading logic.
download(self, path, skip_existing=False, progress_logger=None) ¤
Download the album's tracks in .mp3 format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path | Path | where should the tracks be stored | required |
skip_existing | Optional[bool] | whether or not to overwrite an existing track. Defaults to False | False |
progress_logger | Optional[logging.Logger] | a logger reporting on the download progress. Defaults to None. | None |
Returns:
| Type | Description |
|---|---|
Path | Path: the download folder of the album |