mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +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:
@@ -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