+
This commit is contained in:
parent
8046a81d16
commit
34c818a2cd
1 changed files with 6 additions and 5 deletions
|
|
@ -25,6 +25,8 @@ class Source {
|
||||||
|
|
||||||
String? version;
|
String? version;
|
||||||
|
|
||||||
|
bool? isManga;
|
||||||
|
|
||||||
ItemType? itemType;
|
ItemType? itemType;
|
||||||
|
|
||||||
bool? isFullData;
|
bool? isFullData;
|
||||||
|
|
@ -49,6 +51,7 @@ class Source {
|
||||||
this.sourceCodeUrl = "",
|
this.sourceCodeUrl = "",
|
||||||
this.apiUrl = "",
|
this.apiUrl = "",
|
||||||
this.version = "",
|
this.version = "",
|
||||||
|
this.isManga,
|
||||||
this.itemType = ItemType.manga,
|
this.itemType = ItemType.manga,
|
||||||
this.isFullData = false,
|
this.isFullData = false,
|
||||||
this.appMinVerReq = "0.2.0",
|
this.appMinVerReq = "0.2.0",
|
||||||
|
|
@ -73,6 +76,7 @@ class Source {
|
||||||
isNsfw = json['isNsfw'] ?? false;
|
isNsfw = json['isNsfw'] ?? false;
|
||||||
lang = json['lang'] ?? "";
|
lang = json['lang'] ?? "";
|
||||||
name = json['name'] ?? "";
|
name = json['name'] ?? "";
|
||||||
|
isManga = json['isManga'] ?? ((json['itemType'] as int?) ?? 0) == 0;
|
||||||
sourceCodeUrl = json['sourceCodeUrl'] ?? "";
|
sourceCodeUrl = json['sourceCodeUrl'] ?? "";
|
||||||
typeSource = json['typeSource'] ?? "";
|
typeSource = json['typeSource'] ?? "";
|
||||||
version = json['version'] ?? "";
|
version = json['version'] ?? "";
|
||||||
|
|
@ -95,6 +99,7 @@ class Source {
|
||||||
"sourceCodeUrl": sourceCodeUrl,
|
"sourceCodeUrl": sourceCodeUrl,
|
||||||
"apiUrl": apiUrl,
|
"apiUrl": apiUrl,
|
||||||
"version": version,
|
"version": version,
|
||||||
|
"isManga": isManga ?? (itemType?.index ?? 0) == 0,
|
||||||
"itemType": itemType?.index ?? 0,
|
"itemType": itemType?.index ?? 0,
|
||||||
"isFullData": isFullData,
|
"isFullData": isFullData,
|
||||||
"appMinVerReq": appMinVerReq,
|
"appMinVerReq": appMinVerReq,
|
||||||
|
|
@ -106,8 +111,4 @@ class Source {
|
||||||
|
|
||||||
const branchName = "main";
|
const branchName = "main";
|
||||||
|
|
||||||
enum ItemType {
|
enum ItemType { manga, anime, novel }
|
||||||
manga,
|
|
||||||
anime,
|
|
||||||
novel
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue