mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-20 02:20:11 +08:00
@@ -2,24 +2,15 @@ import 'package:PiliPlus/models_new/later/season.dart';
|
||||
|
||||
class Bangumi {
|
||||
int? epId;
|
||||
String? title;
|
||||
String? longTitle;
|
||||
String? cover;
|
||||
Season? season;
|
||||
|
||||
Bangumi({
|
||||
this.epId,
|
||||
this.title,
|
||||
this.longTitle,
|
||||
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?,
|
||||
cover: json['cover'] as String?,
|
||||
season: json['season'] == null
|
||||
? null
|
||||
: Season.fromJson(json['season'] as Map<String, dynamic>),
|
||||
|
||||
@@ -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/page.dart';
|
||||
import 'package:PiliPlus/models_new/later/rights.dart';
|
||||
import 'package:PiliPlus/models_new/later/stat.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/dimension.dart';
|
||||
@@ -8,7 +7,6 @@ import 'package:PiliPlus/pages/common/multi_select/base.dart';
|
||||
|
||||
class LaterItemModel with MultiSelectData {
|
||||
int? aid;
|
||||
int? videos;
|
||||
String? pic;
|
||||
String? title;
|
||||
String? subtitle;
|
||||
@@ -18,7 +16,6 @@ class LaterItemModel with MultiSelectData {
|
||||
Rights? rights;
|
||||
Owner? owner;
|
||||
Stat? stat;
|
||||
List<Page>? pages;
|
||||
Bangumi? bangumi;
|
||||
int? cid;
|
||||
int? progress;
|
||||
@@ -26,13 +23,11 @@ class LaterItemModel with MultiSelectData {
|
||||
bool? isPgc;
|
||||
String? pgcLabel;
|
||||
bool? isPugv;
|
||||
int? seasonId;
|
||||
bool? isCharging;
|
||||
Dimension? dimension;
|
||||
|
||||
LaterItemModel({
|
||||
this.aid,
|
||||
this.videos,
|
||||
this.pic,
|
||||
this.title,
|
||||
this.subtitle,
|
||||
@@ -42,7 +37,6 @@ class LaterItemModel with MultiSelectData {
|
||||
this.rights,
|
||||
this.owner,
|
||||
this.stat,
|
||||
this.pages,
|
||||
this.bangumi,
|
||||
this.cid,
|
||||
this.progress,
|
||||
@@ -50,14 +44,12 @@ class LaterItemModel with MultiSelectData {
|
||||
this.isPgc,
|
||||
this.pgcLabel,
|
||||
this.isPugv,
|
||||
this.seasonId,
|
||||
this.isCharging,
|
||||
this.dimension,
|
||||
});
|
||||
|
||||
factory LaterItemModel.fromJson(Map<String, dynamic> json) => LaterItemModel(
|
||||
aid: json['aid'] as int?,
|
||||
videos: json['videos'] as int?,
|
||||
pic: json['pic'] as String?,
|
||||
title: json['title'] as String?,
|
||||
pubdate: json['pubdate'] as int?,
|
||||
@@ -72,9 +64,6 @@ class LaterItemModel with MultiSelectData {
|
||||
stat: json['stat'] == null
|
||||
? null
|
||||
: Stat.fromJson(json['stat'] as Map<String, dynamic>),
|
||||
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>),
|
||||
@@ -90,7 +79,6 @@ class LaterItemModel with MultiSelectData {
|
||||
isPgc: json['is_pgc'] as bool?,
|
||||
pgcLabel: json['pgc_label'] == '' ? null : json['pgc_label'],
|
||||
isPugv: json['is_pugv'] as bool?,
|
||||
seasonId: json['season_id'] as int?,
|
||||
isCharging: json['charging_pay']?['level'] != null,
|
||||
dimension: json['dimension'] == null
|
||||
? null
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
class Page {
|
||||
int? cid;
|
||||
int? page;
|
||||
int? duration;
|
||||
|
||||
Page({
|
||||
this.cid,
|
||||
this.page,
|
||||
this.duration,
|
||||
});
|
||||
|
||||
factory Page.fromJson(Map<String, dynamic> json) => Page(
|
||||
cid: json['cid'] as int?,
|
||||
page: json['page'] as int?,
|
||||
duration: json['duration'] as int?,
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,11 @@
|
||||
class Season {
|
||||
int? seasonId;
|
||||
String? title;
|
||||
|
||||
Season({
|
||||
this.seasonId,
|
||||
this.title,
|
||||
});
|
||||
|
||||
factory Season.fromJson(Map<String, dynamic> json) => Season(
|
||||
seasonId: json['season_id'] as int?,
|
||||
title: json['title'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
class Stat {
|
||||
int? aid;
|
||||
int? view;
|
||||
int? danmaku;
|
||||
|
||||
Stat({
|
||||
this.aid,
|
||||
this.view,
|
||||
this.danmaku,
|
||||
});
|
||||
|
||||
factory Stat.fromJson(Map<String, dynamic> json) => Stat(
|
||||
aid: json['aid'] as int?,
|
||||
view: json['view'] as int?,
|
||||
danmaku: json['danmaku'] as int?,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user