mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-28 16:31:15 +00:00
feat: mark albums that contain "best of", "greatest hits", "#1 hits", "number ones" as compilations
This commit is contained in:
1 parent
9754c1a522
commit
bf0073fcf8
1 file changed
+9
-1
+9
-1
@@ -150,7 +150,15 @@ class Album:
|
||||
artists = [a.name for a in self.albumartists] # type: ignore
|
||||
artists = "".join(artists).lower()
|
||||
|
||||
return ("various artists" in artists) or self.title.lower().startswith('the essential')
|
||||
if "various artists" in artists:
|
||||
return True
|
||||
|
||||
substrings = ["the essential", "best of", "greatest hits", "#1 hits", "number ones"]
|
||||
for substring in substrings:
|
||||
if substring in self.title.lower():
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def check_is_ep(self) -> bool:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user