Slight time score bug fixes.

This commit is contained in:
alwayscompiling
2022-07-10 20:27:56 -04:00
parent 3f5ebdf175
commit 83f0bf6498
+6 -3
View File
@@ -79,9 +79,12 @@ async def submit_score(
# create score tuple for either time or int
# define sort index
if highscores_config["categories"][category]["is_time_record"]:
minutes = score.split(":")[0]
seconds = score.split(":")[1]
score_seconds = int(minutes) * 60 + int(seconds)
if score.find(":") == -1:
score_seconds = float(score)
else:
minutes = score.split(":")[0]
seconds = score.split(":")[1]
score_seconds = int(minutes) * 60 + float(seconds)
score_tuple = (user, score, score_seconds)
sort_index = 2