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
+5 -3
View File
@@ -221,13 +221,15 @@ def get_artist(artisthash: str):
genres = list(genres)
min_stamp = min(t.date for t in tracks)
year = datetime.fromtimestamp(min_stamp).year
try:
min_stamp = min(t.date for t in tracks)
year = datetime.fromtimestamp(min_stamp).year
except ValueError:
year = 0
# TODO: Find a way to round a number to the nearest lower 10, and just add an "s" to get the decade
year = int(str(year)[:3])
decade = ""
if year == 196: