mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
修复tag原文显示问题
更新依赖
This commit is contained in:
@@ -12,7 +12,7 @@ ApiResult<T> _$ApiResultFromJson<T>(
|
||||
) =>
|
||||
ApiResult<T>(
|
||||
ok: json['ok'] as bool,
|
||||
status: json['status'] as int,
|
||||
status: (json['status'] as num).toInt(),
|
||||
data: _$nullableGenericFromJson(json['data'], fromJsonT),
|
||||
error: json['error'] as String?,
|
||||
);
|
||||
|
||||
@@ -12,12 +12,12 @@ Config _$ConfigFromJson(Map<String, dynamic> json) => Config(
|
||||
ua: json['ua'] as String?,
|
||||
ex: json['ex'] as bool,
|
||||
base: json['base'] as String,
|
||||
maxTaskCount: json['max_task_count'] as int,
|
||||
maxTaskCount: (json['max_task_count'] as num).toInt(),
|
||||
mpv: json['mpv'] as bool,
|
||||
maxRetryCount: json['max_retry_count'] as int,
|
||||
maxDownloadImgCount: json['max_download_img_count'] as int,
|
||||
maxRetryCount: (json['max_retry_count'] as num).toInt(),
|
||||
maxDownloadImgCount: (json['max_download_img_count'] as num).toInt(),
|
||||
downloadOriginalImg: json['download_original_img'] as bool,
|
||||
port: json['port'] as int,
|
||||
port: (json['port'] as num).toInt(),
|
||||
exportZipJpnTitle: json['export_zip_jpn_title'] as bool,
|
||||
hostname: json['hostname'] as String,
|
||||
meiliHost: json['meili_host'] as String?,
|
||||
@@ -36,13 +36,13 @@ Config _$ConfigFromJson(Map<String, dynamic> json) => Config(
|
||||
.map((e) => e as String)
|
||||
.toList(),
|
||||
flutterFrontend: json['flutter_frontend'] as String?,
|
||||
fetchTimeout: json['fetch_timeout'] as int,
|
||||
downloadTimeout: json['download_timeout'] as int,
|
||||
fetchTimeout: (json['fetch_timeout'] as num).toInt(),
|
||||
downloadTimeout: (json['download_timeout'] as num).toInt(),
|
||||
ffprobePath: json['ffprobe_path'] as String,
|
||||
redirectToFlutter: json['redirect_to_flutter'] as bool,
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int,
|
||||
(json['download_timeout_check_interval'] as num).toInt(),
|
||||
ehMetadataCacheTime: (json['eh_metadata_cache_time'] as num).toInt(),
|
||||
randomFileSecret: json['random_file_secret'] as String?,
|
||||
);
|
||||
|
||||
@@ -102,12 +102,12 @@ ConfigOptional _$ConfigOptionalFromJson(Map<String, dynamic> json) =>
|
||||
ua: json['ua'] as String?,
|
||||
ex: json['ex'] as bool?,
|
||||
base: json['base'] as String?,
|
||||
maxTaskCount: json['max_task_count'] as int?,
|
||||
maxTaskCount: (json['max_task_count'] as num?)?.toInt(),
|
||||
mpv: json['mpv'] as bool?,
|
||||
maxRetryCount: json['max_retry_count'] as int?,
|
||||
maxDownloadImgCount: json['max_download_img_count'] as int?,
|
||||
maxRetryCount: (json['max_retry_count'] as num?)?.toInt(),
|
||||
maxDownloadImgCount: (json['max_download_img_count'] as num?)?.toInt(),
|
||||
downloadOriginalImg: json['download_original_img'] as bool?,
|
||||
port: json['port'] as int?,
|
||||
port: (json['port'] as num?)?.toInt(),
|
||||
exportZipJpnTitle: json['export_zip_jpn_title'] as bool?,
|
||||
hostname: json['hostname'] as String?,
|
||||
meiliHost: json['meili_host'] as String?,
|
||||
@@ -126,13 +126,13 @@ ConfigOptional _$ConfigOptionalFromJson(Map<String, dynamic> json) =>
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
flutterFrontend: json['flutter_frontend'] as String?,
|
||||
fetchTimeout: json['fetch_timeout'] as int?,
|
||||
downloadTimeout: json['download_timeout'] as int?,
|
||||
fetchTimeout: (json['fetch_timeout'] as num?)?.toInt(),
|
||||
downloadTimeout: (json['download_timeout'] as num?)?.toInt(),
|
||||
ffprobePath: json['ffprobe_path'] as String?,
|
||||
redirectToFlutter: json['redirect_to_flutter'] as bool?,
|
||||
downloadTimeoutCheckInterval:
|
||||
json['download_timeout_check_interval'] as int?,
|
||||
ehMetadataCacheTime: json['eh_metadata_cache_time'] as int?,
|
||||
(json['download_timeout_check_interval'] as num?)?.toInt(),
|
||||
ehMetadataCacheTime: (json['eh_metadata_cache_time'] as num?)?.toInt(),
|
||||
randomFileSecret: json['random_file_secret'] as String?,
|
||||
);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Map<String, dynamic> _$GalleryMetadataTorrentInfoToJson(
|
||||
GalleryMetadataSingle _$GalleryMetadataSingleFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
GalleryMetadataSingle(
|
||||
gid: json['gid'] as int,
|
||||
gid: (json['gid'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
archiverKey: json['archiver_key'] as String,
|
||||
title: json['title'] as String,
|
||||
@@ -39,7 +39,7 @@ GalleryMetadataSingle _$GalleryMetadataSingleFromJson(
|
||||
uploader: json['uploader'] as String,
|
||||
posted: json['posted'] as String,
|
||||
filecount: json['filecount'] as String,
|
||||
filesize: json['filesize'] as int,
|
||||
filesize: (json['filesize'] as num).toInt(),
|
||||
expunged: json['expunged'] as bool,
|
||||
rating: json['rating'] as String,
|
||||
torrentcount: json['torrentcount'] as String,
|
||||
|
||||
@@ -7,9 +7,9 @@ part of 'file.dart';
|
||||
// **************************************************************************
|
||||
|
||||
EhFileBasic _$EhFileBasicFromJson(Map<String, dynamic> json) => EhFileBasic(
|
||||
id: json['id'] as int,
|
||||
width: json['width'] as int,
|
||||
height: json['height'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
width: (json['width'] as num).toInt(),
|
||||
height: (json['height'] as num).toInt(),
|
||||
isOriginal: json['is_original'] as bool,
|
||||
);
|
||||
|
||||
@@ -22,9 +22,9 @@ Map<String, dynamic> _$EhFileBasicToJson(EhFileBasic instance) =>
|
||||
};
|
||||
|
||||
EhFileExtend _$EhFileExtendFromJson(Map<String, dynamic> json) => EhFileExtend(
|
||||
id: json['id'] as int,
|
||||
width: json['width'] as int,
|
||||
height: json['height'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
width: (json['width'] as num).toInt(),
|
||||
height: (json['height'] as num).toInt(),
|
||||
isOriginal: json['is_original'] as bool,
|
||||
token: json['token'] as String,
|
||||
);
|
||||
|
||||
@@ -7,20 +7,20 @@ part of 'gallery.dart';
|
||||
// **************************************************************************
|
||||
|
||||
GMeta _$GMetaFromJson(Map<String, dynamic> json) => GMeta(
|
||||
gid: json['gid'] as int,
|
||||
gid: (json['gid'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
title: json['title'] as String,
|
||||
titleJpn: json['title_jpn'] as String,
|
||||
category: json['category'] as String,
|
||||
uploader: json['uploader'] as String,
|
||||
posted: GMeta._fromJson(json['posted'] as int),
|
||||
filecount: json['filecount'] as int,
|
||||
filesize: json['filesize'] as int,
|
||||
posted: GMeta._fromJson((json['posted'] as num).toInt()),
|
||||
filecount: (json['filecount'] as num).toInt(),
|
||||
filesize: (json['filesize'] as num).toInt(),
|
||||
expunged: json['expunged'] as bool,
|
||||
rating: (json['rating'] as num).toDouble(),
|
||||
parentGid: json['parent_gid'] as int?,
|
||||
parentGid: (json['parent_gid'] as num?)?.toInt(),
|
||||
parentToken: json['parent_token'] as String?,
|
||||
firstGid: json['first_gid'] as int?,
|
||||
firstGid: (json['first_gid'] as num?)?.toInt(),
|
||||
firstToken: json['first_token'] as String?,
|
||||
);
|
||||
|
||||
@@ -44,20 +44,20 @@ Map<String, dynamic> _$GMetaToJson(GMeta instance) => <String, dynamic>{
|
||||
|
||||
GMetaOptional _$GMetaOptionalFromJson(Map<String, dynamic> json) =>
|
||||
GMetaOptional(
|
||||
gid: json['gid'] as int?,
|
||||
gid: (json['gid'] as num?)?.toInt(),
|
||||
token: json['token'] as String?,
|
||||
title: json['title'] as String?,
|
||||
titleJpn: json['title_jpn'] as String?,
|
||||
category: json['category'] as String?,
|
||||
uploader: json['uploader'] as String?,
|
||||
posted: GMetaOptional._fromJson(json['posted'] as int?),
|
||||
filecount: json['filecount'] as int?,
|
||||
filesize: json['filesize'] as int?,
|
||||
posted: GMetaOptional._fromJson((json['posted'] as num?)?.toInt()),
|
||||
filecount: (json['filecount'] as num?)?.toInt(),
|
||||
filesize: (json['filesize'] as num?)?.toInt(),
|
||||
expunged: json['expunged'] as bool?,
|
||||
rating: (json['rating'] as num?)?.toDouble(),
|
||||
parentGid: json['parent_gid'] as int?,
|
||||
parentGid: (json['parent_gid'] as num?)?.toInt(),
|
||||
parentToken: json['parent_token'] as String?,
|
||||
firstGid: json['first_gid'] as int?,
|
||||
firstGid: (json['first_gid'] as num?)?.toInt(),
|
||||
firstToken: json['first_token'] as String?,
|
||||
);
|
||||
|
||||
@@ -81,7 +81,7 @@ Map<String, dynamic> _$GMetaOptionalToJson(GMetaOptional instance) =>
|
||||
};
|
||||
|
||||
Tag _$TagFromJson(Map<String, dynamic> json) => Tag(
|
||||
id: json['id'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
tag: json['tag'] as String,
|
||||
translated: json['translated'] as String?,
|
||||
intro: json['intro'] as String?,
|
||||
@@ -96,12 +96,12 @@ Map<String, dynamic> _$TagToJson(Tag instance) => <String, dynamic>{
|
||||
|
||||
ExtendedPMeta _$ExtendedPMetaFromJson(Map<String, dynamic> json) =>
|
||||
ExtendedPMeta(
|
||||
gid: json['gid'] as int,
|
||||
index: json['index'] as int,
|
||||
gid: (json['gid'] as num).toInt(),
|
||||
index: (json['index'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
name: json['name'] as String,
|
||||
width: json['width'] as int,
|
||||
height: json['height'] as int,
|
||||
width: (json['width'] as num).toInt(),
|
||||
height: (json['height'] as num).toInt(),
|
||||
isNsfw: json['is_nsfw'] as bool,
|
||||
isAd: json['is_ad'] as bool,
|
||||
);
|
||||
|
||||
@@ -7,11 +7,11 @@ part of 'task.dart';
|
||||
// **************************************************************************
|
||||
|
||||
Task _$TaskFromJson(Map<String, dynamic> json) => Task(
|
||||
id: json['id'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
type: $enumDecode(_$TaskTypeEnumMap, json['type']),
|
||||
gid: json['gid'] as int,
|
||||
gid: (json['gid'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
pid: json['pid'] as int,
|
||||
pid: (json['pid'] as num).toInt(),
|
||||
details: json['details'] as String?,
|
||||
);
|
||||
|
||||
@@ -34,15 +34,16 @@ const _$TaskTypeEnumMap = {
|
||||
TaskDownloadSingleProgress _$TaskDownloadSingleProgressFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
TaskDownloadSingleProgress(
|
||||
index: json['index'] as int,
|
||||
index: (json['index'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
name: json['name'] as String,
|
||||
width: json['width'] as int,
|
||||
height: json['height'] as int,
|
||||
width: (json['width'] as num).toInt(),
|
||||
height: (json['height'] as num).toInt(),
|
||||
isOriginal: json['is_original'] as bool,
|
||||
total: json['total'] as int,
|
||||
started: TaskDownloadSingleProgress._fromJson(json['started'] as int),
|
||||
downloaded: json['downloaded'] as int,
|
||||
total: (json['total'] as num).toInt(),
|
||||
started: TaskDownloadSingleProgress._fromJson(
|
||||
(json['started'] as num).toInt()),
|
||||
downloaded: (json['downloaded'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TaskDownloadSingleProgressToJson(
|
||||
@@ -61,9 +62,9 @@ Map<String, dynamic> _$TaskDownloadSingleProgressToJson(
|
||||
|
||||
TaskDownloadProgess _$TaskDownloadProgessFromJson(Map<String, dynamic> json) =>
|
||||
TaskDownloadProgess(
|
||||
downloadedPage: json['downloaded_page'] as int,
|
||||
failedPage: json['failed_page'] as int,
|
||||
totalPage: json['total_page'] as int,
|
||||
downloadedPage: (json['downloaded_page'] as num).toInt(),
|
||||
failedPage: (json['failed_page'] as num).toInt(),
|
||||
totalPage: (json['total_page'] as num).toInt(),
|
||||
details: (json['details'] as List<dynamic>)
|
||||
.map((e) =>
|
||||
TaskDownloadSingleProgress.fromJson(e as Map<String, dynamic>))
|
||||
@@ -82,8 +83,8 @@ Map<String, dynamic> _$TaskDownloadProgessToJson(
|
||||
TaskExportZipProgress _$TaskExportZipProgressFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
TaskExportZipProgress(
|
||||
addedPage: json['added_page'] as int,
|
||||
totalPage: json['total_page'] as int,
|
||||
addedPage: (json['added_page'] as num).toInt(),
|
||||
totalPage: (json['total_page'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TaskExportZipProgressToJson(
|
||||
@@ -96,8 +97,8 @@ Map<String, dynamic> _$TaskExportZipProgressToJson(
|
||||
TaskUpdateMeiliSearchDataProgress _$TaskUpdateMeiliSearchDataProgressFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
TaskUpdateMeiliSearchDataProgress(
|
||||
totalGallery: json['total_gallery'] as int,
|
||||
updatedGallery: json['updated_gallery'] as int,
|
||||
totalGallery: (json['total_gallery'] as num).toInt(),
|
||||
updatedGallery: (json['updated_gallery'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TaskUpdateMeiliSearchDataProgressToJson(
|
||||
@@ -110,8 +111,8 @@ Map<String, dynamic> _$TaskUpdateMeiliSearchDataProgressToJson(
|
||||
TaskFixGalleryPageProgress _$TaskFixGalleryPageProgressFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
TaskFixGalleryPageProgress(
|
||||
totalGallery: json['total_gallery'] as int,
|
||||
checkedGallery: json['checked_gallery'] as int,
|
||||
totalGallery: (json['total_gallery'] as num).toInt(),
|
||||
checkedGallery: (json['checked_gallery'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TaskFixGalleryPageProgressToJson(
|
||||
@@ -125,7 +126,9 @@ TaskList _$TaskListFromJson(Map<String, dynamic> json) => TaskList(
|
||||
tasks: (json['tasks'] as List<dynamic>)
|
||||
.map((e) => Task.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
running: (json['running'] as List<dynamic>).map((e) => e as int).toList(),
|
||||
running: (json['running'] as List<dynamic>)
|
||||
.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TaskListToJson(TaskList instance) => <String, dynamic>{
|
||||
@@ -147,10 +150,10 @@ Map<String, dynamic> _$TaskErrorToJson(TaskError instance) => <String, dynamic>{
|
||||
|
||||
DownloadConfig _$DownloadConfigFromJson(Map<String, dynamic> json) =>
|
||||
DownloadConfig(
|
||||
maxDownloadImgCount: json['max_download_img_count'] as int?,
|
||||
maxDownloadImgCount: (json['max_download_img_count'] as num?)?.toInt(),
|
||||
mpv: json['mpv'] as bool?,
|
||||
downloadOriginalImg: json['download_original_img'] as bool?,
|
||||
maxRetryCount: json['max_retry_count'] as int?,
|
||||
maxRetryCount: (json['max_retry_count'] as num?)?.toInt(),
|
||||
removePreviousGallery: json['remove_previous_gallery'] as bool?,
|
||||
);
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ part of 'token.dart';
|
||||
// **************************************************************************
|
||||
|
||||
Token _$TokenFromJson(Map<String, dynamic> json) => Token(
|
||||
id: json['id'] as int,
|
||||
uid: json['uid'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
uid: (json['uid'] as num).toInt(),
|
||||
token: json['token'] as String,
|
||||
expired: Token._fromJson(json['expired'] as String),
|
||||
httpOnly: json['http_only'] as bool,
|
||||
@@ -39,7 +39,8 @@ TokenWithUserInfo _$TokenWithUserInfoFromJson(Map<String, dynamic> json) =>
|
||||
token: Token.fromJson(json['token'] as Map<String, dynamic>),
|
||||
name: json['name'] as String,
|
||||
isAdmin: json['is_admin'] as bool,
|
||||
permissions: UserPermissions.fromJson(json['permissions'] as int),
|
||||
permissions:
|
||||
UserPermissions.fromJson((json['permissions'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TokenWithUserInfoToJson(TokenWithUserInfo instance) =>
|
||||
|
||||
@@ -7,10 +7,11 @@ part of 'user.dart';
|
||||
// **************************************************************************
|
||||
|
||||
BUser _$BUserFromJson(Map<String, dynamic> json) => BUser(
|
||||
id: json['id'] as int,
|
||||
id: (json['id'] as num).toInt(),
|
||||
username: json['username'] as String,
|
||||
isAdmin: json['is_admin'] as bool,
|
||||
permissions: UserPermissions.fromJson(json['permissions'] as int),
|
||||
permissions:
|
||||
UserPermissions.fromJson((json['permissions'] as num).toInt()),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BUserToJson(BUser instance) => <String, dynamic>{
|
||||
|
||||
Reference in New Issue
Block a user