mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 15:49:49 +00:00
48 lines
1.0 KiB
Dart
48 lines
1.0 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'options.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class Options {
|
|
String name;
|
|
String path;
|
|
List<int> selectFiles;
|
|
Object? extra;
|
|
|
|
Options({
|
|
this.name = '',
|
|
this.path = '',
|
|
this.selectFiles = const [],
|
|
this.extra,
|
|
});
|
|
|
|
factory Options.fromJson(Map<String, dynamic> json) =>
|
|
_$OptionsFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$OptionsToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class OptsExtraHttp {
|
|
int connections;
|
|
bool? autoTorrent;
|
|
bool? deleteTorrentAfterDownload;
|
|
bool? autoExtract;
|
|
String archivePassword;
|
|
bool deleteAfterExtract;
|
|
|
|
OptsExtraHttp({
|
|
this.connections = 0,
|
|
this.autoTorrent,
|
|
this.deleteTorrentAfterDownload,
|
|
this.autoExtract,
|
|
this.archivePassword = '',
|
|
this.deleteAfterExtract = false,
|
|
});
|
|
|
|
factory OptsExtraHttp.fromJson(Map<String, dynamic> json) =>
|
|
_$OptsExtraHttpFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$OptsExtraHttpToJson(this);
|
|
}
|