feat: add album dates to artist albums

This commit is contained in:
geoffrey45
2023-02-09 21:15:07 +03:00
parent 1be60f73e4
commit 97e29c3254
3 changed files with 16 additions and 7 deletions
+8 -1
View File
@@ -159,7 +159,8 @@ class Album:
if "various artists" in artists:
return True
substrings = ["the essential", "best of", "greatest hits", "#1 hits", "number ones", "super hits"]
substrings = ["the essential", "best of", "greatest hits", "#1 hits", "number ones", "super hits",
"ultimate collection"]
for substring in substrings:
if substring in self.title.lower():
@@ -198,6 +199,12 @@ class Album:
):
self.is_single = True
def get_date_from_tracks(self, tracks: list[Track]):
for track in tracks:
if track.date != "Unknown":
self.date = track.date
break
@dataclass
class Playlist: