mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
33
lib/models_new/later/bangumi.dart
Normal file
33
lib/models_new/later/bangumi.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:PiliPlus/models_new/later/season.dart';
|
||||
|
||||
class Bangumi {
|
||||
int? epId;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
int? episodeStatus;
|
||||
int? follow;
|
||||
String? cover;
|
||||
Season? season;
|
||||
|
||||
Bangumi({
|
||||
this.epId,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
this.episodeStatus,
|
||||
this.follow,
|
||||
this.cover,
|
||||
this.season,
|
||||
});
|
||||
|
||||
factory Bangumi.fromJson(Map<String, dynamic> json) => Bangumi(
|
||||
epId: json['ep_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
longTitle: json['long_title'] as String?,
|
||||
episodeStatus: json['episode_status'] as int?,
|
||||
follow: json['follow'] as int?,
|
||||
cover: json['cover'] as String?,
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
15
lib/models_new/later/data.dart
Normal file
15
lib/models_new/later/data.dart
Normal file
@@ -0,0 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/later/list.dart';
|
||||
|
||||
class LaterData {
|
||||
int? count;
|
||||
List<LaterItemModel>? list;
|
||||
|
||||
LaterData({this.count, this.list});
|
||||
|
||||
factory LaterData.fromJson(Map<String, dynamic> json) => LaterData(
|
||||
count: json['count'] as int?,
|
||||
list: (json['list'] as List<dynamic>?)
|
||||
?.map((e) => LaterItemModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
13
lib/models_new/later/dimension.dart
Normal file
13
lib/models_new/later/dimension.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Dimension {
|
||||
int? width;
|
||||
int? height;
|
||||
int? rotate;
|
||||
|
||||
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?,
|
||||
);
|
||||
}
|
||||
164
lib/models_new/later/list.dart
Normal file
164
lib/models_new/later/list.dart
Normal file
@@ -0,0 +1,164 @@
|
||||
import 'package:PiliPlus/pages/common/multi_select_controller.dart';
|
||||
|
||||
import 'package:PiliPlus/models_new/later/bangumi.dart';
|
||||
import 'package:PiliPlus/models_new/later/dimension.dart';
|
||||
import 'package:PiliPlus/models_new/later/owner.dart';
|
||||
import 'package:PiliPlus/models_new/later/page.dart';
|
||||
import 'package:PiliPlus/models_new/later/rights.dart';
|
||||
import 'package:PiliPlus/models_new/later/stat.dart';
|
||||
|
||||
class LaterItemModel with MultiSelectData {
|
||||
int? aid;
|
||||
int? videos;
|
||||
int? tid;
|
||||
String? tname;
|
||||
int? copyright;
|
||||
String? pic;
|
||||
String? title;
|
||||
String? subtitle;
|
||||
int? pubdate;
|
||||
int? ctime;
|
||||
String? desc;
|
||||
int? state;
|
||||
int? duration;
|
||||
String? redirectUrl;
|
||||
Rights? rights;
|
||||
Owner? owner;
|
||||
Stat? stat;
|
||||
String? dynam1c;
|
||||
Dimension? dimension;
|
||||
String? shortLinkV2;
|
||||
int? upFromV2;
|
||||
String? pubLocation;
|
||||
String? cover43;
|
||||
int? tidv2;
|
||||
String? tnamev2;
|
||||
int? pidV2;
|
||||
String? pidNameV2;
|
||||
List<Page>? pages;
|
||||
Bangumi? bangumi;
|
||||
int? cid;
|
||||
int? progress;
|
||||
int? addAt;
|
||||
String? bvid;
|
||||
String? uri;
|
||||
bool? viewed;
|
||||
int? seq;
|
||||
int? enableVt;
|
||||
String? viewText1;
|
||||
bool? isPgc;
|
||||
String? pgcLabel;
|
||||
bool? isPugv;
|
||||
int? missionId;
|
||||
String? firstFrame;
|
||||
int? seasonId;
|
||||
|
||||
LaterItemModel({
|
||||
this.aid,
|
||||
this.videos,
|
||||
this.tid,
|
||||
this.tname,
|
||||
this.copyright,
|
||||
this.pic,
|
||||
this.title,
|
||||
this.subtitle,
|
||||
this.pubdate,
|
||||
this.ctime,
|
||||
this.desc,
|
||||
this.state,
|
||||
this.duration,
|
||||
this.redirectUrl,
|
||||
this.rights,
|
||||
this.owner,
|
||||
this.stat,
|
||||
this.dynam1c,
|
||||
this.dimension,
|
||||
this.shortLinkV2,
|
||||
this.upFromV2,
|
||||
this.pubLocation,
|
||||
this.cover43,
|
||||
this.tidv2,
|
||||
this.tnamev2,
|
||||
this.pidV2,
|
||||
this.pidNameV2,
|
||||
this.pages,
|
||||
this.bangumi,
|
||||
this.cid,
|
||||
this.progress,
|
||||
this.addAt,
|
||||
this.bvid,
|
||||
this.uri,
|
||||
this.viewed,
|
||||
this.seq,
|
||||
this.enableVt,
|
||||
this.viewText1,
|
||||
this.isPgc,
|
||||
this.pgcLabel,
|
||||
this.isPugv,
|
||||
this.missionId,
|
||||
this.firstFrame,
|
||||
this.seasonId,
|
||||
});
|
||||
|
||||
factory LaterItemModel.fromJson(Map<String, dynamic> json) => LaterItemModel(
|
||||
aid: json['aid'] as int?,
|
||||
videos: json['videos'] as int?,
|
||||
tid: json['tid'] as int?,
|
||||
tname: json['tname'] as String?,
|
||||
copyright: json['copyright'] as int?,
|
||||
pic: json['pic'] as String?,
|
||||
title: json['title'] as String?,
|
||||
pubdate: json['pubdate'] as int?,
|
||||
ctime: json['ctime'] as int?,
|
||||
desc: json['desc'] as String?,
|
||||
state: json['state'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
redirectUrl: json['redirect_url'] as String?,
|
||||
rights: json['rights'] == null
|
||||
? null
|
||||
: Rights.fromJson(json['rights'] as Map<String, dynamic>),
|
||||
owner: json['owner'] == null
|
||||
? null
|
||||
: Owner.fromJson(json['owner'] as Map<String, dynamic>),
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
dynam1c: json['dynamic'] as String?,
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
shortLinkV2: json['short_link_v2'] as String?,
|
||||
upFromV2: json['up_from_v2'] as int?,
|
||||
pubLocation: json['pub_location'] as String?,
|
||||
cover43: json['cover43'] as String?,
|
||||
tidv2: json['tidv2'] as int?,
|
||||
tnamev2: json['tnamev2'] as String?,
|
||||
pidV2: json['pid_v2'] as int?,
|
||||
pidNameV2: json['pid_name_v2'] as String?,
|
||||
pages: (json['pages'] as List<dynamic>?)
|
||||
?.map((e) => Page.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
bangumi: json['bangumi'] == null
|
||||
? null
|
||||
: Bangumi.fromJson(json['bangumi'] as Map<String, dynamic>),
|
||||
subtitle: json['bangumi'] == null
|
||||
? null
|
||||
: (json['title'] as String)
|
||||
.replaceFirst('${json['bangumi']['season']['title']} ', ''),
|
||||
cid: json['cid'] as int?,
|
||||
progress: json['progress'] as int?,
|
||||
addAt: json['add_at'] as int?,
|
||||
bvid: json['bvid'] as String?,
|
||||
uri: json['uri'] as String?,
|
||||
viewed: json['viewed'] as bool?,
|
||||
seq: json['seq'] as int?,
|
||||
enableVt: json['enable_vt'] as int?,
|
||||
viewText1: json['view_text_1'] as String?,
|
||||
isPgc: json['is_pgc'] as bool?,
|
||||
pgcLabel: json['pgc_label'] as String?,
|
||||
isPugv: json['is_pugv'] as bool?,
|
||||
missionId: json['mission_id'] as int?,
|
||||
firstFrame: json['first_frame'] as String?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
);
|
||||
}
|
||||
13
lib/models_new/later/owner.dart
Normal file
13
lib/models_new/later/owner.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class Owner {
|
||||
int? mid;
|
||||
String? name;
|
||||
String? face;
|
||||
|
||||
Owner({this.mid, this.name, this.face});
|
||||
|
||||
factory Owner.fromJson(Map<String, dynamic> json) => Owner(
|
||||
mid: json['mid'] as int?,
|
||||
name: json['name'] as String?,
|
||||
face: json['face'] as String?,
|
||||
);
|
||||
}
|
||||
39
lib/models_new/later/page.dart
Normal file
39
lib/models_new/later/page.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:PiliPlus/models_new/later/dimension.dart';
|
||||
|
||||
class Page {
|
||||
int? cid;
|
||||
int? page;
|
||||
String? from;
|
||||
String? part;
|
||||
int? duration;
|
||||
String? vid;
|
||||
String? weblink;
|
||||
Dimension? dimension;
|
||||
int? ctime;
|
||||
|
||||
Page({
|
||||
this.cid,
|
||||
this.page,
|
||||
this.from,
|
||||
this.part,
|
||||
this.duration,
|
||||
this.vid,
|
||||
this.weblink,
|
||||
this.dimension,
|
||||
this.ctime,
|
||||
});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
cid: json['cid'] as int?,
|
||||
page: json['page'] as int?,
|
||||
from: json['from'] as String?,
|
||||
part: json['part'] as String?,
|
||||
duration: json['duration'] as int?,
|
||||
vid: json['vid'] as String?,
|
||||
weblink: json['weblink'] as String?,
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
: Dimension.fromJson(json['dimension'] as Map<String, dynamic>),
|
||||
ctime: json['ctime'] as int?,
|
||||
);
|
||||
}
|
||||
50
lib/models_new/later/rights.dart
Normal file
50
lib/models_new/later/rights.dart
Normal file
@@ -0,0 +1,50 @@
|
||||
class Rights {
|
||||
int? bp;
|
||||
int? elec;
|
||||
int? download;
|
||||
int? movie;
|
||||
int? pay;
|
||||
int? hd5;
|
||||
int? noReprint;
|
||||
int? autoplay;
|
||||
int? ugcPay;
|
||||
int? isCooperation;
|
||||
int? ugcPayPreview;
|
||||
int? noBackground;
|
||||
int? arcPay;
|
||||
int? payFreeWatch;
|
||||
|
||||
Rights({
|
||||
this.bp,
|
||||
this.elec,
|
||||
this.download,
|
||||
this.movie,
|
||||
this.pay,
|
||||
this.hd5,
|
||||
this.noReprint,
|
||||
this.autoplay,
|
||||
this.ugcPay,
|
||||
this.isCooperation,
|
||||
this.ugcPayPreview,
|
||||
this.noBackground,
|
||||
this.arcPay,
|
||||
this.payFreeWatch,
|
||||
});
|
||||
|
||||
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?,
|
||||
hd5: json['hd5'] as int?,
|
||||
noReprint: json['no_reprint'] as int?,
|
||||
autoplay: json['autoplay'] as int?,
|
||||
ugcPay: json['ugc_pay'] as int?,
|
||||
isCooperation: json['is_cooperation'] as int?,
|
||||
ugcPayPreview: json['ugc_pay_preview'] as int?,
|
||||
noBackground: json['no_background'] as int?,
|
||||
arcPay: json['arc_pay'] as int?,
|
||||
payFreeWatch: json['pay_free_watch'] as int?,
|
||||
);
|
||||
}
|
||||
32
lib/models_new/later/season.dart
Normal file
32
lib/models_new/later/season.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class Season {
|
||||
int? seasonId;
|
||||
String? title;
|
||||
int? seasonStatus;
|
||||
int? isFinish;
|
||||
int? totalCount;
|
||||
int? newestEpId;
|
||||
String? newestEpIndex;
|
||||
int? seasonType;
|
||||
|
||||
Season({
|
||||
this.seasonId,
|
||||
this.title,
|
||||
this.seasonStatus,
|
||||
this.isFinish,
|
||||
this.totalCount,
|
||||
this.newestEpId,
|
||||
this.newestEpIndex,
|
||||
this.seasonType,
|
||||
});
|
||||
|
||||
factory Season.fromJson(Map<String, dynamic> json) => Season(
|
||||
seasonId: json['season_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
seasonStatus: json['season_status'] as int?,
|
||||
isFinish: json['is_finish'] as int?,
|
||||
totalCount: json['total_count'] as int?,
|
||||
newestEpId: json['newest_ep_id'] as int?,
|
||||
newestEpIndex: json['newest_ep_index'] as String?,
|
||||
seasonType: json['season_type'] as int?,
|
||||
);
|
||||
}
|
||||
47
lib/models_new/later/stat.dart
Normal file
47
lib/models_new/later/stat.dart
Normal file
@@ -0,0 +1,47 @@
|
||||
class Stat {
|
||||
int? aid;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
int? reply;
|
||||
int? favorite;
|
||||
int? coin;
|
||||
int? share;
|
||||
int? nowRank;
|
||||
int? hisRank;
|
||||
int? like;
|
||||
int? dislike;
|
||||
int? vt;
|
||||
int? vv;
|
||||
|
||||
Stat({
|
||||
this.aid,
|
||||
this.view,
|
||||
this.danmaku,
|
||||
this.reply,
|
||||
this.favorite,
|
||||
this.coin,
|
||||
this.share,
|
||||
this.nowRank,
|
||||
this.hisRank,
|
||||
this.like,
|
||||
this.dislike,
|
||||
this.vt,
|
||||
this.vv,
|
||||
});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
aid: json['aid'] as int?,
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
reply: json['reply'] as int?,
|
||||
favorite: json['favorite'] as int?,
|
||||
coin: json['coin'] as int?,
|
||||
share: json['share'] as int?,
|
||||
nowRank: json['now_rank'] as int?,
|
||||
hisRank: json['his_rank'] as int?,
|
||||
like: json['like'] as int?,
|
||||
dislike: json['dislike'] as int?,
|
||||
vt: json['vt'] as int?,
|
||||
vv: json['vv'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user