mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
@@ -1,41 +1,15 @@
|
||||
class CntInfo {
|
||||
int? collect;
|
||||
int? play;
|
||||
int? thumbUp;
|
||||
int? thumbDown;
|
||||
int? share;
|
||||
int? reply;
|
||||
int? danmaku;
|
||||
num? coin;
|
||||
int? vt;
|
||||
int? playSwitch;
|
||||
String? viewText1;
|
||||
|
||||
CntInfo({
|
||||
this.collect,
|
||||
this.play,
|
||||
this.thumbUp,
|
||||
this.thumbDown,
|
||||
this.share,
|
||||
this.reply,
|
||||
|
||||
this.danmaku,
|
||||
this.coin,
|
||||
this.vt,
|
||||
this.playSwitch,
|
||||
this.viewText1,
|
||||
});
|
||||
|
||||
factory CntInfo.fromJson(Map<String, dynamic> json) => CntInfo(
|
||||
collect: json['collect'] as int?,
|
||||
play: json['play'] as int?,
|
||||
thumbUp: json['thumb_up'] as int?,
|
||||
thumbDown: json['thumb_down'] as int?,
|
||||
share: json['share'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
coin: json['coin'] as num?,
|
||||
vt: json['vt'] as int?,
|
||||
playSwitch: json['play_switch'] as int?,
|
||||
viewText1: json['view_text_1'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ class FavDetailData {
|
||||
FavFolderInfo? info;
|
||||
List<FavDetailItemModel>? medias;
|
||||
bool? hasMore;
|
||||
int? ttl;
|
||||
|
||||
FavDetailData({this.info, this.medias, this.hasMore, this.ttl});
|
||||
FavDetailData({this.info, this.medias, this.hasMore});
|
||||
|
||||
factory FavDetailData.fromJson(Map<String, dynamic> json) => FavDetailData(
|
||||
info: json['info'] == null
|
||||
@@ -17,6 +16,5 @@ class FavDetailData {
|
||||
?.map((e) => FavDetailItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
hasMore: json['has_more'] as bool?,
|
||||
ttl: json['ttl'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
import 'package:PiliPlus/models/model_owner.dart';
|
||||
import 'package:PiliPlus/models_new/fav/fav_detail/cnt_info.dart';
|
||||
|
||||
class FavDetailInfo {
|
||||
int? id;
|
||||
int? fid;
|
||||
int? mid;
|
||||
int? attr;
|
||||
String? title;
|
||||
String? cover;
|
||||
Owner? upper;
|
||||
int? coverType;
|
||||
CntInfo? cntInfo;
|
||||
int? type;
|
||||
String? intro;
|
||||
int? ctime;
|
||||
int? mtime;
|
||||
int? state;
|
||||
int? favState;
|
||||
int? likeState;
|
||||
int? mediaCount;
|
||||
bool? isTop;
|
||||
|
||||
FavDetailInfo({
|
||||
this.id,
|
||||
this.fid,
|
||||
this.mid,
|
||||
this.attr,
|
||||
this.title,
|
||||
this.cover,
|
||||
this.upper,
|
||||
this.coverType,
|
||||
this.cntInfo,
|
||||
this.type,
|
||||
this.intro,
|
||||
this.ctime,
|
||||
this.mtime,
|
||||
this.state,
|
||||
this.favState,
|
||||
this.likeState,
|
||||
this.mediaCount,
|
||||
this.isTop,
|
||||
});
|
||||
|
||||
factory FavDetailInfo.fromJson(Map<String, dynamic> json) => FavDetailInfo(
|
||||
id: json['id'] as int?,
|
||||
fid: json['fid'] as int?,
|
||||
mid: json['mid'] as int?,
|
||||
attr: json['attr'] as int?,
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['upper'] as Map<String, dynamic>),
|
||||
coverType: json['cover_type'] as int?,
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
type: json['type'] as int?,
|
||||
intro: json['intro'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
mtime: json['mtime'] as int?,
|
||||
state: json['state'] as int?,
|
||||
favState: json['fav_state'] as int?,
|
||||
likeState: json['like_state'] as int?,
|
||||
mediaCount: json['media_count'] as int?,
|
||||
isTop: json['is_top'] as bool?,
|
||||
);
|
||||
}
|
||||
@@ -10,19 +10,14 @@ class FavDetailItemModel with MultiSelectData {
|
||||
String? title;
|
||||
String? cover;
|
||||
String? intro;
|
||||
int? page;
|
||||
int? duration;
|
||||
Owner? upper;
|
||||
int? attr;
|
||||
CntInfo? cntInfo;
|
||||
String? link;
|
||||
int? ctime;
|
||||
int? pubtime;
|
||||
int? favTime;
|
||||
String? bvid;
|
||||
Ogv? ogv;
|
||||
Ugc? ugc;
|
||||
String? mediaListLink;
|
||||
|
||||
FavDetailItemModel({
|
||||
this.id,
|
||||
@@ -30,19 +25,14 @@ class FavDetailItemModel with MultiSelectData {
|
||||
this.title,
|
||||
this.cover,
|
||||
this.intro,
|
||||
this.page,
|
||||
this.duration,
|
||||
this.upper,
|
||||
this.attr,
|
||||
this.cntInfo,
|
||||
this.link,
|
||||
this.ctime,
|
||||
this.pubtime,
|
||||
this.favTime,
|
||||
this.bvid,
|
||||
this.ogv,
|
||||
this.ugc,
|
||||
this.mediaListLink,
|
||||
});
|
||||
|
||||
factory FavDetailItemModel.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -52,7 +42,6 @@ class FavDetailItemModel with MultiSelectData {
|
||||
title: json['title'] as String?,
|
||||
cover: json['cover'] as String?,
|
||||
intro: json['intro'] as String?,
|
||||
page: json['page'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
upper: json['upper'] == null
|
||||
? null
|
||||
@@ -61,15 +50,11 @@ class FavDetailItemModel with MultiSelectData {
|
||||
cntInfo: json['cnt_info'] == null
|
||||
? null
|
||||
: CntInfo.fromJson(json['cnt_info'] as Map<String, dynamic>),
|
||||
link: json['link'] as String?,
|
||||
ctime: json['ctime'] as int?,
|
||||
pubtime: json['pubtime'] as int?,
|
||||
favTime: json['fav_time'] as int?,
|
||||
bvid: json['bvid'] ?? json['bv_id'],
|
||||
ogv: json['ogv'] == null ? null : Ogv.fromJson(json['ogv']),
|
||||
ugc: json['ugc'] == null
|
||||
? null
|
||||
: Ugc.fromJson(json['ugc'] as Map<String, dynamic>),
|
||||
mediaListLink: json['media_list_link'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
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'],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user