Allow POSIX platforms only to stop downloads. Windows is another ball of wax, as usual.
This commit is contained in:
4
main.go
4
main.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user