mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
feat: check if album is a concert
This commit is contained in:
@@ -109,6 +109,7 @@ class Album:
|
|||||||
is_single: bool = False
|
is_single: bool = False
|
||||||
is_EP: bool = False
|
is_EP: bool = False
|
||||||
is_favorite: bool = False
|
is_favorite: bool = False
|
||||||
|
is_live: bool = False
|
||||||
genres: list[str] = dataclasses.field(default_factory=list)
|
genres: list[str] = dataclasses.field(default_factory=list)
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
@@ -126,6 +127,10 @@ class Album:
|
|||||||
if self.is_soundtrack:
|
if self.is_soundtrack:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.is_live = self.check_is_live_album()
|
||||||
|
if self.is_live:
|
||||||
|
return
|
||||||
|
|
||||||
self.is_compilation = self.check_is_compilation()
|
self.is_compilation = self.check_is_compilation()
|
||||||
if self.is_compilation:
|
if self.is_compilation:
|
||||||
return
|
return
|
||||||
@@ -160,6 +165,17 @@ class Album:
|
|||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def check_is_live_album(self):
|
||||||
|
"""
|
||||||
|
Checks if the album is a live album.
|
||||||
|
"""
|
||||||
|
keywords = ["live from", "live at"]
|
||||||
|
for keyword in keywords:
|
||||||
|
if keyword in self.title.lower():
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def check_is_ep(self) -> bool:
|
def check_is_ep(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Checks if the album is an EP.
|
Checks if the album is an EP.
|
||||||
|
|||||||
Reference in New Issue
Block a user