From 1a3c3311e63bea06e0d0792701e589dea623f105 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Fri, 23 May 2025 15:35:01 +0800 Subject: [PATCH] fix(arai2): cannot select file back after unselected (#2386) --- application/dependency/dependency.go | 2 +- pkg/downloader/aria2/aria2.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/dependency/dependency.go b/application/dependency/dependency.go index 82e2d5a..4013383 100644 --- a/application/dependency/dependency.go +++ b/application/dependency/dependency.go @@ -593,7 +593,7 @@ func (d *dependency) RemoteDownloadQueue(ctx context.Context) queue.Queue { queue.WithName("RemoteDownloadQueue"), queue.WithMaxTaskExecution(queueSetting.MaxExecution), queue.WithResumeTaskType(queue.RemoteDownloadTaskType), - queue.WithTaskPullInterval(20*time.Second), + queue.WithTaskPullInterval(10*time.Second), ) return d.remoteDownloadQueue } diff --git a/pkg/downloader/aria2/aria2.go b/pkg/downloader/aria2/aria2.go index 01e25da..e2922fa 100644 --- a/pkg/downloader/aria2/aria2.go +++ b/pkg/downloader/aria2/aria2.go @@ -245,6 +245,8 @@ func (a *aria2Client) SetFilesToDownload(ctx context.Context, handle *downloader for _, arg := range args { if !arg.Download { delete(selected, arg.Index) + } else { + selected[arg.Index] = true } }