add setting to show albums with single track as singles

+ add the above setting to db queries file and migration
This commit is contained in:
mungai-njoroge
2023-09-04 19:46:46 +03:00
parent 83bbe69550
commit 6c0024f699
7 changed files with 24 additions and 5 deletions
+9
View File
@@ -166,11 +166,20 @@ class Album:
Checks if the album is a single.
"""
keywords = ["single version", "- single"]
show_albums_as_singles = get_flag(
SessionVarKeys.SHOW_ALBUMS_AS_SINGLES
)
for keyword in keywords:
if keyword in self.title.lower():
self.is_single = True
return
if show_albums_as_singles and len(tracks) == 1:
self.is_single = True
return
if (
len(tracks) == 1
and (