From eeee6eea4e538cccad051e0f2a2dd18534394a8f Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Fri, 13 Jan 2023 14:26:25 -0500 Subject: [PATCH] Fix seconds calculator --- vrobbler/apps/scrobbles/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/utils.py b/vrobbler/apps/scrobbles/utils.py index 84cedc9..4c8bafa 100644 --- a/vrobbler/apps/scrobbles/utils.py +++ b/vrobbler/apps/scrobbles/utils.py @@ -13,7 +13,10 @@ def convert_to_seconds(run_time: str) -> int: actually be in seconds so we'll convert it""" if ":" in run_time: run_time_list = run_time.split(":") - run_time = (int(run_time_list[1]) * 60) + int(run_time_list[2]) + hours = int(run_time_list[0]) + minutes = int(run_time_list[1]) + seconds = int(run_time_list[2]) + run_time = (((hours * 60) + minutes) * 60) + seconds return int(run_time)