fixed 'fetched in X seconds seconds'
All checks were successful
Run Integration Tests / test (push) Successful in 26s

This commit is contained in:
partisan 2025-04-24 16:56:41 +02:00
parent 06f8604779
commit 6445be87a9
9 changed files with 38 additions and 18 deletions

View file

@ -2,7 +2,6 @@
package main
import (
"fmt"
"net/http"
"sync"
"time"
@ -59,7 +58,6 @@ func handleMusicSearch(w http.ResponseWriter, settings UserSettings, query strin
go prefetchMusicPages(query, page)
elapsed := time.Since(start) // Calculate duration
fetched := fmt.Sprintf("%.2f %s", elapsed.Seconds(), Translate("seconds"))
data := map[string]interface{}{
"Results": results,
@ -72,7 +70,7 @@ func handleMusicSearch(w http.ResponseWriter, settings UserSettings, query strin
"Theme": settings.Theme,
"IsThemeDark": settings.IsThemeDark,
"Trans": Translate,
"Fetched": fetched,
"Fetched": FormatElapsedTime(elapsed),
}
renderTemplate(w, "music.html", data)