mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-16 21:33:41 +00:00
feat: add auto-start incomplete tasks on application startup (#1203)
This commit is contained in:
1 parent
24db9bb58b
commit
71c9e6947a
13 files changed
+50
-8
No files matched your search
@@ -133,6 +133,16 @@ Future<void> init(Args args) async {
|
||||
logger.e("load config fail", e);
|
||||
}
|
||||
|
||||
// Auto-start incomplete tasks if enabled
|
||||
if (controller.downloaderConfig.value.extra.autoStartTasks) {
|
||||
try {
|
||||
await api.continueAllTasks(null);
|
||||
logger.i("auto-start tasks completed");
|
||||
} catch (e) {
|
||||
logger.w("auto-start tasks fail", e);
|
||||
}
|
||||
}
|
||||
|
||||
() async {
|
||||
if (Util.isDesktop()) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user