mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 18:10:29 +00:00
feat: support max running tasks config (#112)
This commit is contained in:
1 parent
1e08ecd8db
commit
d9c5ca339f
22 files changed
+269
-129
No files matched your search
+2
-2
@@ -33,7 +33,7 @@ func CreateTask(w http.ResponseWriter, r *http.Request) {
|
||||
if req.Rid != "" {
|
||||
taskId, err = Downloader.Create(req.Rid, req.Opts)
|
||||
} else if req.Req != nil {
|
||||
taskId, err = Downloader.DirectCreate(req.Req, req.Opts)
|
||||
taskId, err = Downloader.CreateDirect(req.Req, req.Opts)
|
||||
} else {
|
||||
WriteJson(w, model.NewErrorResult("param invalid: rid or req", model.CodeInvalidParam))
|
||||
return
|
||||
@@ -195,6 +195,6 @@ func writeError(w http.ResponseWriter, msg string) {
|
||||
}
|
||||
|
||||
func getServerConfig() *download.DownloaderStoreConfig {
|
||||
_, cfg, _ := Downloader.GetConfig()
|
||||
cfg, _ := Downloader.GetConfig()
|
||||
return cfg
|
||||
}
|
||||
Reference in new issue
Block a user