Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -6,8 +6,8 @@ class Badge {
Badge({this.text, this.bgStyle, this.img});
factory Badge.fromJson(Map<String, dynamic> json) => Badge(
text: json['text'] as String?,
bgStyle: json['bg_style'] as int?,
img: json['img'] as String?,
);
text: json['text'] as String?,
bgStyle: json['bg_style'] as int?,
img: json['img'] as String?,
);
}

View File

@@ -5,7 +5,7 @@ class Coin {
Coin({this.maxNum, this.coinNumber});
factory Coin.fromJson(Map<String, dynamic> json) => Coin(
maxNum: json['max_num'] as num?,
coinNumber: json['coin_number'] as num?,
);
maxNum: json['max_num'] as num?,
coinNumber: json['coin_number'] as num?,
);
}

View File

@@ -6,15 +6,19 @@ class MediaListData {
int? totalCount;
String? nextStartKey;
MediaListData(
{this.mediaList, this.hasMore, this.totalCount, this.nextStartKey});
MediaListData({
this.mediaList,
this.hasMore,
this.totalCount,
this.nextStartKey,
});
factory MediaListData.fromJson(Map<String, dynamic> json) => MediaListData(
mediaList: (json['media_list'] as List<dynamic>?)
?.map((e) => MediaListItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
hasMore: json['has_more'] as bool?,
totalCount: json['total_count'] as int?,
nextStartKey: json['next_start_key'] as String?,
);
mediaList: (json['media_list'] as List<dynamic>?)
?.map((e) => MediaListItemModel.fromJson(e as Map<String, dynamic>))
.toList(),
hasMore: json['has_more'] as bool?,
totalCount: json['total_count'] as int?,
nextStartKey: json['next_start_key'] as String?,
);
}

View File

@@ -6,8 +6,8 @@ class Dimension {
Dimension({this.width, this.height, this.rotate});
factory Dimension.fromJson(Map<String, dynamic> json) => Dimension(
width: json['width'] as int?,
height: json['height'] as int?,
rotate: json['rotate'] as int?,
);
width: json['width'] as int?,
height: json['height'] as int?,
rotate: json['rotate'] as int?,
);
}

View File

@@ -83,8 +83,9 @@ class MediaListItemModel {
attr = json['attr'] as int?;
tid = json['tid'] as int?;
copyRight = json['copy_right'] as int?;
cntInfo =
json['cnt_info'] == null ? null : CntInfo.fromJson(json['cnt_info']);
cntInfo = json['cnt_info'] == null
? null
: CntInfo.fromJson(json['cnt_info']);
cover = json['cover'] as String?;
duration = json['duration'] as int?;
pubtime = json['pubtime'] as int?;
@@ -101,8 +102,9 @@ class MediaListItemModel {
rights = json['rights'] == null ? null : Rights.fromJson(json['rights']);
elecInfo = json['elec_info'] as dynamic;
coin = json['coin'] == null ? null : Coin.fromJson(json['coin']);
ogvInfo =
json['ogv_info'] == null ? null : OgvInfo.fromJson(json['ogv_info']);
ogvInfo = json['ogv_info'] == null
? null
: OgvInfo.fromJson(json['ogv_info']);
progressPercent = (json['progress_percent'] as num?)?.toDouble();
badge = json['badge'] == null ? null : Badge.fromJson(json['badge']);
forbidFav = json['forbid_fav'] as bool?;

View File

@@ -10,12 +10,12 @@ class OgvInfo {
OgvInfo({this.epid, this.seasonId, this.aid, this.cid, this.dimension});
factory OgvInfo.fromJson(Map<String, dynamic> json) => OgvInfo(
epid: json['epid'] as int?,
seasonId: json['season_id'] as int?,
aid: json['aid'] as int?,
cid: json['cid'] as int?,
dimension: json['dimension'] == null
? null
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
);
epid: json['epid'] as int?,
seasonId: json['season_id'] as int?,
aid: json['aid'] as int?,
cid: json['cid'] as int?,
dimension: json['dimension'] == null
? null
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
);
}

View File

@@ -22,15 +22,15 @@ class Page {
});
factory Page.fromJson(Map<String, dynamic> json) => Page(
id: json["id"],
title: json["title"],
intro: json["intro"],
duration: json["duration"],
link: json["link"],
page: json["page"],
from: json["from"],
dimension: json["dimension"] == null
? null
: Dimension.fromJson(json["dimension"]),
);
id: json["id"],
title: json["title"],
intro: json["intro"],
duration: json["duration"],
link: json["link"],
page: json["page"],
from: json["from"],
dimension: json["dimension"] == null
? null
: Dimension.fromJson(json["dimension"]),
);
}

View File

@@ -24,15 +24,15 @@ class Rights {
});
factory Rights.fromJson(Map<String, dynamic> json) => Rights(
bp: json['bp'] as int?,
elec: json['elec'] as int?,
download: json['download'] as int?,
movie: json['movie'] as int?,
pay: json['pay'] as int?,
ugcPay: json['ugc_pay'] as int?,
hd5: json['hd5'] as int?,
noReprint: json['no_reprint'] as int?,
autoplay: json['autoplay'] as int?,
noBackground: json['no_background'] as int?,
);
bp: json['bp'] as int?,
elec: json['elec'] as int?,
download: json['download'] as int?,
movie: json['movie'] as int?,
pay: json['pay'] as int?,
ugcPay: json['ugc_pay'] as int?,
hd5: json['hd5'] as int?,
noReprint: json['no_reprint'] as int?,
autoplay: json['autoplay'] as int?,
noBackground: json['no_background'] as int?,
);
}