mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 12:53:41 +00:00
feat: support post-task script hooks (#1265)
This commit is contained in:
1 parent
3eb6df55df
commit
1b1631b41a
20 files changed
+911
No files matched your search
@@ -10,6 +10,7 @@ class DownloaderConfig {
|
||||
ExtraConfig extra = ExtraConfig();
|
||||
ProxyConfig proxy = ProxyConfig();
|
||||
WebhookConfig webhook = WebhookConfig();
|
||||
ScriptConfig script = ScriptConfig();
|
||||
AutoTorrentConfig autoTorrent = AutoTorrentConfig();
|
||||
ArchiveConfig archive = ArchiveConfig();
|
||||
bool autoDeleteMissingFileTasks;
|
||||
@@ -149,6 +150,22 @@ class WebhookConfig {
|
||||
Map<String, dynamic> toJson() => _$WebhookConfigToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ScriptConfig {
|
||||
bool enable;
|
||||
List<String> paths;
|
||||
|
||||
ScriptConfig({
|
||||
this.enable = false,
|
||||
this.paths = const [],
|
||||
});
|
||||
|
||||
factory ScriptConfig.fromJson(Map<String, dynamic>? json) =>
|
||||
json == null ? ScriptConfig() : _$ScriptConfigFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ScriptConfigToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ProxyConfig {
|
||||
bool enable;
|
||||
|
||||
Reference in new issue
Block a user