Allow POSIX platforms only to stop downloads. Windows is another ball of wax, as usual.

This commit is contained in:
2022-01-06 21:37:30 +10:30
parent f487ff0371
commit 4a5b5009eb
3 changed files with 10 additions and 2 deletions

View File

@@ -296,7 +296,7 @@ func fetchHandler(w http.ResponseWriter, r *http.Request) {
panic(err)
}
templateData := map[string]interface{}{"dl": dl, "config": conf}
templateData := map[string]interface{}{"dl": dl, "config": conf, "canStop": download.CanStopDownload}
err = t.ExecuteTemplate(w, "layout", templateData)
if err != nil {
@@ -353,7 +353,7 @@ func fetchHandler(w http.ResponseWriter, r *http.Request) {
panic(err)
}
templateData := map[string]interface{}{"dl": newDownload, "config": conf}
templateData := map[string]interface{}{"dl": newDownload, "config": conf, "canStop": download.CanStopDownload}
err = t.ExecuteTemplate(w, "layout", templateData)
if err != nil {