From 5f863a45a803002a652dd6eb36ef91a8437defbb Mon Sep 17 00:00:00 2001 From: wanji Date: Fri, 2 Jan 2026 21:52:25 +0300 Subject: [PATCH] classify albums ending with "the album" as soundtracks --- src/swingmusic/models/album.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/swingmusic/models/album.py b/src/swingmusic/models/album.py index f268226f..04015fc7 100644 --- a/src/swingmusic/models/album.py +++ b/src/swingmusic/models/album.py @@ -103,11 +103,17 @@ class Album: """ Checks if the album is a soundtrack. """ + title = self.og_title.lower() + keywords = ["motion picture", "soundtrack"] for keyword in keywords: - if keyword in self.og_title.lower(): + if keyword in title: return True + # if og_title ends with "the album" + if len(title) > 10 and title.endswith("the album"): + return True + return False def is_compilation(self) -> bool: