mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-12 03:14:09 +00:00
fix(resolve): release cancelled previews and preserve task ownership
This commit is contained in:
1 parent
763731eaaa
commit
8161042b93
14 files changed
+506
-36
No files matched your search
+1
-1
@@ -24,7 +24,7 @@ func Info(w http.ResponseWriter, r *http.Request) {
|
||||
func Resolve(w http.ResponseWriter, r *http.Request) {
|
||||
var req model.ResolveTask
|
||||
if ReadJson(r, w, &req) {
|
||||
rr, err := Downloader.Resolve(req.Req)
|
||||
rr, err := Downloader.ResolveWithID(req.ID, req.Req)
|
||||
if err != nil {
|
||||
WriteJson(w, model.NewErrorResult(err.Error()))
|
||||
return
|
||||
|
||||
@@ -3,6 +3,7 @@ package model
|
||||
import "github.com/GopeedLab/gopeed/pkg/base"
|
||||
|
||||
type ResolveTask struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Req *base.Request `json:"req"`
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user