mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
Add new server settings
This commit is contained in:
@@ -41,6 +41,7 @@ class Config {
|
||||
required this.ffprobePath,
|
||||
required this.redirectToFlutter,
|
||||
required this.downloadTimeoutCheckInterval,
|
||||
required this.ehMetadataCacheTime,
|
||||
});
|
||||
bool cookies;
|
||||
@JsonKey(name: 'db_path')
|
||||
@@ -93,6 +94,8 @@ class Config {
|
||||
bool redirectToFlutter;
|
||||
@JsonKey(name: 'download_timeout_check_interval')
|
||||
int downloadTimeoutCheckInterval;
|
||||
@JsonKey(name: "eh_metadata_cache_time")
|
||||
int ehMetadataCacheTime;
|
||||
factory Config.fromJson(Map<String, dynamic> json) => _$ConfigFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ConfigToJson(this);
|
||||
}
|
||||
@@ -141,6 +144,7 @@ class ConfigOptional {
|
||||
this.ffprobePath,
|
||||
this.redirectToFlutter,
|
||||
this.downloadTimeoutCheckInterval,
|
||||
this.ehMetadataCacheTime,
|
||||
});
|
||||
String? cookies;
|
||||
@JsonKey(name: 'db_path')
|
||||
@@ -193,6 +197,8 @@ class ConfigOptional {
|
||||
bool? redirectToFlutter;
|
||||
@JsonKey(name: 'download_timeout_check_interval')
|
||||
int? downloadTimeoutCheckInterval;
|
||||
@JsonKey(name: "eh_metadata_cache_time")
|
||||
int? ehMetadataCacheTime;
|
||||
factory ConfigOptional.fromJson(Map<String, dynamic> json) =>
|
||||
_$ConfigOptionalFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ConfigOptionalToJson(this);
|
||||
|
||||
@@ -42,6 +42,7 @@ Config _$ConfigFromJson(Map<String, dynamic> json) => Config(
|
||||
redirectToFlutter: json['redirect_to_flutter'] as bool,
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
@@ -74,6 +75,7 @@ Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'ffprobe_path': instance.ffprobePath,
|
||||
'redirect_to_flutter': instance.redirectToFlutter,
|
||||
'download_timeout_check_interval': instance.downloadTimeoutCheckInterval,
|
||||
'eh_metadata_cache_time': instance.ehMetadataCacheTime,
|
||||
};
|
||||
|
||||
const _$ThumbnailMethodEnumMap = {
|
||||
@@ -128,6 +130,7 @@ ConfigOptional _$ConfigOptionalFromJson(Map<String, dynamic> json) =>
|
||||
redirectToFlutter: json['redirect_to_flutter'] as bool?,
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int?,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ConfigOptionalToJson(ConfigOptional instance) =>
|
||||
@@ -161,4 +164,5 @@ Map<String, dynamic> _$ConfigOptionalToJson(ConfigOptional instance) =>
|
||||
'ffprobe_path': instance.ffprobePath,
|
||||
'redirect_to_flutter': instance.redirectToFlutter,
|
||||
'download_timeout_check_interval': instance.downloadTimeoutCheckInterval,
|
||||
'eh_metadata_cache_time': instance.ehMetadataCacheTime,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user