mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-17 13:53:41 +00:00
feat: add config for auto-torrent (#1219)
This commit is contained in:
1 parent
a3c1f84c2c
commit
7b840b4261
31 files changed
+742
-131
No files matched your search
@@ -36,17 +36,29 @@ Map<String, dynamic> _$OptionsToJson(Options instance) {
|
||||
OptsExtraHttp _$OptsExtraHttpFromJson(Map<String, dynamic> json) =>
|
||||
OptsExtraHttp(
|
||||
connections: (json['connections'] as num?)?.toInt() ?? 0,
|
||||
autoTorrent: json['autoTorrent'] as bool? ?? false,
|
||||
autoExtract: json['autoExtract'] as bool? ?? false,
|
||||
autoTorrent: json['autoTorrent'] as bool?,
|
||||
deleteTorrentAfterDownload: json['deleteTorrentAfterDownload'] as bool?,
|
||||
autoExtract: json['autoExtract'] as bool?,
|
||||
archivePassword: json['archivePassword'] as String? ?? '',
|
||||
deleteAfterExtract: json['deleteAfterExtract'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$OptsExtraHttpToJson(OptsExtraHttp instance) =>
|
||||
<String, dynamic>{
|
||||
'connections': instance.connections,
|
||||
'autoTorrent': instance.autoTorrent,
|
||||
'autoExtract': instance.autoExtract,
|
||||
'archivePassword': instance.archivePassword,
|
||||
'deleteAfterExtract': instance.deleteAfterExtract,
|
||||
};
|
||||
Map<String, dynamic> _$OptsExtraHttpToJson(OptsExtraHttp instance) {
|
||||
final val = <String, dynamic>{
|
||||
'connections': instance.connections,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('autoTorrent', instance.autoTorrent);
|
||||
writeNotNull(
|
||||
'deleteTorrentAfterDownload', instance.deleteTorrentAfterDownload);
|
||||
writeNotNull('autoExtract', instance.autoExtract);
|
||||
val['archivePassword'] = instance.archivePassword;
|
||||
val['deleteAfterExtract'] = instance.deleteAfterExtract;
|
||||
return val;
|
||||
}
|
||||
Reference in new issue
Block a user