mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
feat: auto extract archives (#1212)
This commit is contained in:
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(
|
||||
|
||||
Reference in new issue
Block a user