mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-08 12:15:39 +00:00
fix inheritance in Artist model class
This commit is contained in:
parent
fe6c12d856
commit
805df18ac3
@ -27,15 +27,15 @@ class Artist(ArtistMinimal):
|
|||||||
Artist class
|
Artist class
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
name: str = ""
|
||||||
trackcount: int = 0
|
trackcount: int = 0
|
||||||
albumcount: int = 0
|
albumcount: int = 0
|
||||||
duration: int = 0
|
duration: int = 0
|
||||||
colors: list[str] = dataclasses.field(default_factory=list)
|
colors: list[str] = dataclasses.field(default_factory=list)
|
||||||
is_favorite: bool = False
|
is_favorite: bool = False
|
||||||
|
|
||||||
def __init__(self, name: str):
|
def __post_init__(self):
|
||||||
super(Artist, self).__init__(name)
|
super(Artist, self).__init__(self.name)
|
||||||
self.colors = json.loads(str(self.colors))
|
|
||||||
|
|
||||||
def set_trackcount(self, count: int):
|
def set_trackcount(self, count: int):
|
||||||
self.trackcount = count
|
self.trackcount = count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user