From 9754c1a5227ce077d680cebf5534b4a37fd28e39 Mon Sep 17 00:00:00 2001 From: geoffrey45 Date: Tue, 7 Feb 2023 12:31:00 +0300 Subject: [PATCH] feat: mark albums that start with "the essential" as compilations --- app/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models.py b/app/models.py index 2600cf35..82350212 100644 --- a/app/models.py +++ b/app/models.py @@ -130,7 +130,7 @@ class Album: if self.is_compilation: return - self.is_EP = self.check_is_EP() + self.is_EP = self.check_is_ep() def check_is_soundtrack(self) -> bool: """ @@ -150,9 +150,9 @@ class Album: artists = [a.name for a in self.albumartists] # type: ignore artists = "".join(artists).lower() - return "various artists" in artists + return ("various artists" in artists) or self.title.lower().startswith('the essential') - def check_is_EP(self) -> bool: + def check_is_ep(self) -> bool: """ Checks if the album is an EP. """