feat: auto extract archives (#1212)

This commit is contained in:
Matteo Pietro Dazzi authored and GitHub committed 2025-12-29 17:27:49 +08:00
1 parent 5515a1c48c
commit 0d5c4e8e7f
35 files changed
+950 -40

No files matched your search

@@ -148,6 +148,46 @@ class SettingView extends GetView<SettingController> {
);
});
// Archive auto extract configuration
final buildAutoExtract = _buildConfigItem('autoExtract', () {
return appController.downloaderConfig.value.archive.autoExtract
? 'on'.tr
: 'off'.tr;
}, (Key key) {
return Container(
alignment: Alignment.centerLeft,
child: Switch(
value: appController.downloaderConfig.value.archive.autoExtract,
onChanged: (bool value) async {
appController.downloaderConfig.update((val) {
val!.archive.autoExtract = value;
});
await debounceSave();
},
),
);
});
// Archive delete after extract configuration
final buildDeleteAfterExtract = _buildConfigItem('deleteAfterExtract', () {
return appController.downloaderConfig.value.archive.deleteAfterExtract
? 'on'.tr
: 'off'.tr;
}, (Key key) {
return Container(
alignment: Alignment.centerLeft,
child: Switch(
value: appController.downloaderConfig.value.archive.deleteAfterExtract,
onChanged: (bool value) async {
appController.downloaderConfig.update((val) {
val!.archive.deleteAfterExtract = value;
});
await debounceSave();
},
),
);
});
// Download categories configuration
buildDownloadCategories() {
final categories = downloaderCfg.value.extra.downloadCategories
@@ -1315,6 +1355,14 @@ class SettingView extends GetView<SettingController> {
buildAutoStartup(),
]),
)),
Text('archives'.tr),
Card(
child: Column(
children: _addDivider([
buildAutoExtract(),
buildDeleteAfterExtract(),
]),
)),
const Text('HTTP'),
Card(
child: Column(