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

@@ -10,6 +10,7 @@ class DownloaderConfig {
ExtraConfig extra = ExtraConfig();
ProxyConfig proxy = ProxyConfig();
WebhookConfig webhook = WebhookConfig();
ArchiveConfig archive = ArchiveConfig();
DownloaderConfig({
this.downloadDir = '',
@@ -226,3 +227,19 @@ class ExtraConfigGithubMirror {
Map<String, dynamic> toJson() => _$ExtraConfigGithubMirrorToJson(this);
}
@JsonSerializable()
class ArchiveConfig {
bool autoExtract;
bool deleteAfterExtract;
ArchiveConfig({
this.autoExtract = true,
this.deleteAfterExtract = true,
});
factory ArchiveConfig.fromJson(Map<String, dynamic>? json) =>
json == null ? ArchiveConfig() : _$ArchiveConfigFromJson(json);
Map<String, dynamic> toJson() => _$ArchiveConfigToJson(this);
}