mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-27 04:26:58 +08:00
opt handle res
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -8,7 +8,7 @@ class DanmakuBlockDataModel {
|
||||
|
||||
DanmakuBlockDataModel.fromJson(Map<String, dynamic> json) {
|
||||
rule = (json['rule'] as List?)?.map((v) => SimpleRule.fromJson(v)).toList();
|
||||
toast = json['toast'];
|
||||
toast = json['toast'] == '' ? null : json['toast'];
|
||||
valid = json['valid'];
|
||||
ver = json['ver'];
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
|
||||
String? link;
|
||||
int? ctime;
|
||||
int? favTime;
|
||||
Map? ogv;
|
||||
Ogv? ogv;
|
||||
String? epId;
|
||||
|
||||
FavDetailItemData.fromJson(Map<String, dynamic> json) {
|
||||
@@ -51,7 +51,7 @@ class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
|
||||
pubdate = json['pubtime'];
|
||||
favTime = json['fav_time'];
|
||||
bvid = json['bvid'];
|
||||
ogv = json['ogv'];
|
||||
ogv = json['ogv'] == null ? null : Ogv.fromJson(json['ogv']);
|
||||
stat = PlayStat.fromJson(json['cnt_info']);
|
||||
cid = json['ugc']?['first_cid'];
|
||||
if (json['link'] != null && json['link'].contains('/bangumi')) {
|
||||
@@ -62,3 +62,21 @@ class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
|
||||
static final _digitRegExp = RegExp(r'\d+');
|
||||
String resolveEpId(String url) => _digitRegExp.firstMatch(url)!.group(0)!;
|
||||
}
|
||||
|
||||
class Ogv {
|
||||
String? typeName;
|
||||
int? typeId;
|
||||
int? seasonId;
|
||||
|
||||
Ogv({
|
||||
this.typeName,
|
||||
this.typeId,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory Ogv.fromJson(Map<String, dynamic> json) => Ogv(
|
||||
typeName: json["type_name"],
|
||||
typeId: json["type_id"],
|
||||
seasonId: json["season_id"],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class HisListItem with MultiSelectData {
|
||||
longTitle = json['long_title'];
|
||||
cover = json['cover'];
|
||||
pic = json['cover'] ?? '';
|
||||
covers = json['covers'] ?? [];
|
||||
covers = json['covers'];
|
||||
uri = json['uri'];
|
||||
history = History.fromJson(json['history']);
|
||||
videos = json['videos'];
|
||||
|
||||
@@ -8,10 +8,8 @@ class MyEmote {
|
||||
setting =
|
||||
json['setting'] != null ? Setting.fromJson(json['setting']) : null;
|
||||
if (json['packages'] != null) {
|
||||
packages = <Packages>[];
|
||||
json['packages'].forEach((v) {
|
||||
packages!.add(Packages.fromJson(v));
|
||||
});
|
||||
packages =
|
||||
(json['packages'] as List).map((e) => Packages.fromJson(e)).toList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,10 +87,7 @@ class Packages {
|
||||
attr = json['attr'];
|
||||
meta = json['meta'] != null ? PackagesMeta.fromJson(json['meta']) : null;
|
||||
if (json['emote'] != null) {
|
||||
emote = <Emote>[];
|
||||
json['emote'].forEach((v) {
|
||||
emote!.add(Emote.fromJson(v));
|
||||
});
|
||||
emote = (json['emote'] as List).map((e) => Emote.fromJson(e)).toList();
|
||||
}
|
||||
flags =
|
||||
json['flags'] != null ? PackagesFlags.fromJson(json['flags']) : null;
|
||||
|
||||
Reference in New Issue
Block a user