mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Add new settings
This commit is contained in:
@@ -42,6 +42,7 @@ class Config {
|
||||
required this.redirectToFlutter,
|
||||
required this.downloadTimeoutCheckInterval,
|
||||
required this.ehMetadataCacheTime,
|
||||
this.randomFileSecret,
|
||||
});
|
||||
bool cookies;
|
||||
@JsonKey(name: 'db_path')
|
||||
@@ -96,6 +97,8 @@ class Config {
|
||||
int downloadTimeoutCheckInterval;
|
||||
@JsonKey(name: "eh_metadata_cache_time")
|
||||
int ehMetadataCacheTime;
|
||||
@JsonKey(name: "random_file_secret")
|
||||
String? randomFileSecret;
|
||||
factory Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ConfigToJson(this);
|
||||
}
|
||||
@@ -145,6 +148,7 @@ class ConfigOptional {
|
||||
this.redirectToFlutter,
|
||||
this.downloadTimeoutCheckInterval,
|
||||
this.ehMetadataCacheTime,
|
||||
this.randomFileSecret,
|
||||
});
|
||||
String? cookies;
|
||||
@JsonKey(name: 'db_path')
|
||||
@@ -199,6 +203,8 @@ class ConfigOptional {
|
||||
int? downloadTimeoutCheckInterval;
|
||||
@JsonKey(name: "eh_metadata_cache_time")
|
||||
int? ehMetadataCacheTime;
|
||||
@JsonKey(name: "random_file_secret")
|
||||
String? randomFileSecret;
|
||||
factory ConfigOptional.fromJson(Map<String, dynamic> json) =>
|
||||
_$ConfigOptionalFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ConfigOptionalToJson(this);
|
||||
|
||||
@@ -43,6 +43,7 @@ Config _$ConfigFromJson(Map<String, dynamic> json) => Config(
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int,
|
||||
randomFileSecret: json['random_file_secret'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
@@ -76,6 +77,7 @@ Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'redirect_to_flutter': instance.redirectToFlutter,
|
||||
'download_timeout_check_interval': instance.downloadTimeoutCheckInterval,
|
||||
'eh_metadata_cache_time': instance.ehMetadataCacheTime,
|
||||
'random_file_secret': instance.randomFileSecret,
|
||||
};
|
||||
|
||||
const _$ThumbnailMethodEnumMap = {
|
||||
@@ -131,6 +133,7 @@ ConfigOptional _$ConfigOptionalFromJson(Map<String, dynamic> json) =>
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int?,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int?,
|
||||
randomFileSecret: json['random_file_secret'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ConfigOptionalToJson(ConfigOptional instance) =>
|
||||
@@ -165,4 +168,5 @@ Map<String, dynamic> _$ConfigOptionalToJson(ConfigOptional instance) =>
|
||||
'redirect_to_flutter': instance.redirectToFlutter,
|
||||
'download_timeout_check_interval': instance.downloadTimeoutCheckInterval,
|
||||
'eh_metadata_cache_time': instance.ehMetadataCacheTime,
|
||||
'random_file_secret': instance.randomFileSecret,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user