finished????

This commit is contained in:
Hellow
2022-12-16 18:26:05 +01:00
parent 23b3ab0101
commit b51904d438
3 changed files with 35 additions and 10 deletions

View File

@@ -298,6 +298,9 @@ class Album(DatabaseObject):
def __str__(self) -> str:
return f"Album: \"{self.title}\""
def __repr__(self):
return self.__str__()
def __len__(self) -> int:
return len(self.tracklist)
@@ -335,7 +338,7 @@ class Artist(DatabaseObject):
name: str = None,
main_songs: List[Song] = None,
feature_songs: List[Song] = None,
main_albums: List[Song] = None
main_albums: List[Album] = None
):
DatabaseObject.__init__(self, id_=id_)
@@ -389,7 +392,7 @@ class Artist(DatabaseObject):
return song_release
def get_discography(self) -> List[Album]:
flat_copy_discography = self.discography.copy()
flat_copy_discography = self.main_albums.copy()
flat_copy_discography.append(self.get_features())
return flat_copy_discography