From 83f0bf6498ad9082a304d79aef145557a52215a9 Mon Sep 17 00:00:00 2001 From: alwayscompiling Date: Sun, 10 Jul 2022 20:27:56 -0400 Subject: [PATCH] Slight time score bug fixes. --- utilities/utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/utilities/utils.py b/utilities/utils.py index b7999b2..ec11055 100644 --- a/utilities/utils.py +++ b/utilities/utils.py @@ -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