mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-29 15:54:42 +00:00
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:
1 parent
83bbe69550
commit
6c0024f699
7 files changed
+24
-5
No files matched your search
@@ -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 (
|
||||
|
||||
Reference in new issue
Block a user