diff --git a/pomice/spotify/album.py b/pomice/spotify/album.py index ec2270e..9b914ec 100644 --- a/pomice/spotify/album.py +++ b/pomice/spotify/album.py @@ -1,15 +1,20 @@ from .track import Track + class Album: """The base class for a Spotify album""" + def __init__(self, data: dict) -> None: - self.name = data['name'] - self.artists = ", ".join(artist["name"] for artist in data['artists']) - self.tracks = [Track(track) for track in data['tracks']['items']] - self.total_tracks = data['total_tracks'] - self.id = data['id'] - self.image = data['images'][0]['url'] - self.uri = data['external_urls']['spotify'] + self.name = data["name"] + self.artists = ", ".join(artist["name"] for artist in data["artists"]) + self.tracks = [Track(track) for track in data["tracks"]["items"]] + self.total_tracks = data["total_tracks"] + self.id = data["id"] + self.image = data["images"][0]["url"] + self.uri = data["external_urls"]["spotify"] def __repr__(self) -> str: - return f"" \ No newline at end of file + return ( + f"" + )