Skip to content

Commit

Permalink
fix(playlists): use classmethod instead of init
Browse files Browse the repository at this point in the history
  • Loading branch information
ooliver1 committed Oct 9, 2022
1 parent fe72b48 commit 861e050
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion mafic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from .track import *

# TODO: filters
# TODO: playlists

del __libraries

Expand Down
2 changes: 1 addition & 1 deletion mafic/playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ class Playlist:
def __init__(self, *, info: PlaylistInfo, tracks: list[TrackWithInfo]):
self.name: str = info["name"]
self.selected_track: int = info["selectedTrack"]
self.tracks: list[Track] = [Track(**track) for track in tracks]
self.tracks: list[Track] = [Track.from_data(**track) for track in tracks]

0 comments on commit 861e050

Please sign in to comment.