mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
feat: add album dates to artist albums
This commit is contained in:
+8
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user