Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-16 14:22:47 +08:00
parent 13818533a7
commit 0baf3fcd36
283 changed files with 803 additions and 1550 deletions

View File

@@ -4,8 +4,6 @@ class Bangumi {
int? epId;
String? title;
String? longTitle;
int? episodeStatus;
int? follow;
String? cover;
Season? season;
@@ -13,8 +11,6 @@ class Bangumi {
this.epId,
this.title,
this.longTitle,
this.episodeStatus,
this.follow,
this.cover,
this.season,
});
@@ -23,8 +19,6 @@ class 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

View File

@@ -1,13 +0,0 @@
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?,
);
}

View File

@@ -1,6 +1,5 @@
import 'package:PiliPlus/models/model_owner.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';
@@ -9,94 +8,46 @@ import 'package:PiliPlus/pages/common/multi_select/base.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;
bool? isCharging;
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,
this.isCharging,
});
@@ -104,15 +55,9 @@ class LaterItemModel with MultiSelectData {
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
@@ -124,18 +69,6 @@ class LaterItemModel with MultiSelectData {
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(),
@@ -150,18 +83,10 @@ class LaterItemModel with MultiSelectData {
),
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'] == '' ? null : json['pgc_label'],
isPugv: json['is_pugv'] as bool?,
missionId: json['mission_id'] as int?,
firstFrame: json['first_frame'] as String?,
seasonId: json['season_id'] as int?,
isCharging: json['charging_pay']?['level'] != null,
);

View File

@@ -1,13 +0,0 @@
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?,
);
}

View File

@@ -1,39 +1,17 @@
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?,
);
}

View File

@@ -1,50 +1,11 @@
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?,
);
}

View File

@@ -1,32 +1,14 @@
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?,
);
}

View File

@@ -2,46 +2,16 @@ class Stat {
int? aid;
int? view;
int? danmaku;
int? reply;
int? favorite;
num? 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 num?,
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?,
);
}