From fa6b69045d8eb92b028792a2113d7e36c6c825b9 Mon Sep 17 00:00:00 2001 From: Bram Date: Fri, 27 Feb 2026 15:32:33 +0100 Subject: [PATCH] fix hours bug --- src/handlers.go | 4 ++-- templates/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/handlers.go b/src/handlers.go index 7058b55..4352730 100644 --- a/src/handlers.go +++ b/src/handlers.go @@ -50,9 +50,9 @@ func uploadHandler(c *gin.Context) { return } - durationHours := 24 // default + durationHours := 24 if val := c.PostForm("duration"); val != "" { - fmt.Println("Duration provided:", val) + fmt.Println("Duration:", val) if parsed, err := strconv.Atoi(val); err == nil { durationHours = parsed } diff --git a/templates/index.html b/templates/index.html index d489768..2170436 100644 --- a/templates/index.html +++ b/templates/index.html @@ -267,7 +267,7 @@ fd.append("file", file); fd.append("once", document.getElementById("once").checked ? "true" : "false"); const hours = parseInt(document.getElementById("duration").value, 10); - fd.append("duration", hours * 3600); // convert hours to seconds + fd.append("duration", hours); const xhr = new XMLHttpRequest(); currentXhr = xhr;