fixed 'fetched in X seconds seconds'
All checks were successful
Run Integration Tests / test (push) Successful in 26s
All checks were successful
Run Integration Tests / test (push) Successful in 26s
This commit is contained in:
parent
06f8604779
commit
6445be87a9
9 changed files with 38 additions and 18 deletions
4
music.go
4
music.go
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue