mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 15:25:47 +08:00
opt episode
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -2,21 +2,18 @@ import 'package:PiliPlus/models_new/pgc/pgc_info_model/badge_info.dart';
|
|||||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/dimension.dart';
|
import 'package:PiliPlus/models_new/pgc/pgc_info_model/dimension.dart';
|
||||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/rights.dart';
|
import 'package:PiliPlus/models_new/pgc/pgc_info_model/rights.dart';
|
||||||
import 'package:PiliPlus/models_new/pgc/pgc_info_model/skip.dart';
|
import 'package:PiliPlus/models_new/pgc/pgc_info_model/skip.dart';
|
||||||
|
import 'package:PiliPlus/models_new/video/video_detail/episode.dart'
|
||||||
|
show BaseEpisodeItem;
|
||||||
|
|
||||||
class EpisodeItem {
|
class EpisodeItem extends BaseEpisodeItem {
|
||||||
int? aid;
|
|
||||||
String? badge;
|
|
||||||
BadgeInfo? badgeInfo;
|
BadgeInfo? badgeInfo;
|
||||||
int? badgeType;
|
int? badgeType;
|
||||||
String? bvid;
|
|
||||||
int? cid;
|
|
||||||
String? cover;
|
String? cover;
|
||||||
Dimension? dimension;
|
Dimension? dimension;
|
||||||
int? duration;
|
int? duration;
|
||||||
bool? enableVt;
|
bool? enableVt;
|
||||||
int? epId;
|
int? epId;
|
||||||
String? from;
|
String? from;
|
||||||
int? id;
|
|
||||||
bool? isViewHide;
|
bool? isViewHide;
|
||||||
String? link;
|
String? link;
|
||||||
String? longTitle;
|
String? longTitle;
|
||||||
@@ -33,23 +30,22 @@ class EpisodeItem {
|
|||||||
Skip? skip;
|
Skip? skip;
|
||||||
int? status;
|
int? status;
|
||||||
String? subtitle;
|
String? subtitle;
|
||||||
String? title;
|
|
||||||
String? vid;
|
String? vid;
|
||||||
|
|
||||||
EpisodeItem({
|
EpisodeItem({
|
||||||
this.aid,
|
super.aid,
|
||||||
this.badge,
|
super.badge,
|
||||||
this.badgeInfo,
|
this.badgeInfo,
|
||||||
this.badgeType,
|
this.badgeType,
|
||||||
this.bvid,
|
super.bvid,
|
||||||
this.cid,
|
super.cid,
|
||||||
this.cover,
|
this.cover,
|
||||||
this.dimension,
|
this.dimension,
|
||||||
this.duration,
|
this.duration,
|
||||||
this.enableVt,
|
this.enableVt,
|
||||||
this.epId,
|
this.epId,
|
||||||
this.from,
|
this.from,
|
||||||
this.id,
|
super.id,
|
||||||
this.isViewHide,
|
this.isViewHide,
|
||||||
this.link,
|
this.link,
|
||||||
this.longTitle,
|
this.longTitle,
|
||||||
@@ -66,7 +62,7 @@ class EpisodeItem {
|
|||||||
this.skip,
|
this.skip,
|
||||||
this.status,
|
this.status,
|
||||||
this.subtitle,
|
this.subtitle,
|
||||||
this.title,
|
super.title,
|
||||||
this.vid,
|
this.vid,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,45 @@
|
|||||||
import 'package:PiliPlus/models_new/video/video_detail/arc.dart';
|
import 'package:PiliPlus/models_new/video/video_detail/arc.dart';
|
||||||
import 'package:PiliPlus/models_new/video/video_detail/page.dart';
|
import 'package:PiliPlus/models_new/video/video_detail/page.dart';
|
||||||
|
|
||||||
class EpisodeItem {
|
abstract class BaseEpisodeItem {
|
||||||
int? seasonId;
|
|
||||||
int? sectionId;
|
|
||||||
int? id;
|
int? id;
|
||||||
int? aid;
|
int? aid;
|
||||||
int? cid;
|
int? cid;
|
||||||
|
String? bvid;
|
||||||
|
String? badge;
|
||||||
String? title;
|
String? title;
|
||||||
|
|
||||||
|
BaseEpisodeItem({
|
||||||
|
this.id,
|
||||||
|
this.aid,
|
||||||
|
this.cid,
|
||||||
|
this.bvid,
|
||||||
|
this.badge,
|
||||||
|
this.title,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class EpisodeItem extends BaseEpisodeItem {
|
||||||
|
int? seasonId;
|
||||||
|
int? sectionId;
|
||||||
int? attribute;
|
int? attribute;
|
||||||
Arc? arc;
|
Arc? arc;
|
||||||
Part? page;
|
Part? page;
|
||||||
String? bvid;
|
|
||||||
List<Part>? pages;
|
List<Part>? pages;
|
||||||
String? badge;
|
|
||||||
|
|
||||||
EpisodeItem({
|
EpisodeItem({
|
||||||
this.seasonId,
|
this.seasonId,
|
||||||
this.sectionId,
|
this.sectionId,
|
||||||
this.id,
|
super.id,
|
||||||
this.aid,
|
super.aid,
|
||||||
this.cid,
|
super.cid,
|
||||||
this.title,
|
super.title,
|
||||||
this.attribute,
|
this.attribute,
|
||||||
this.arc,
|
this.arc,
|
||||||
this.page,
|
this.page,
|
||||||
this.bvid,
|
super.bvid,
|
||||||
this.pages,
|
this.pages,
|
||||||
this.badge,
|
super.badge,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory EpisodeItem.fromJson(Map<String, dynamic> json) => EpisodeItem(
|
factory EpisodeItem.fromJson(Map<String, dynamic> json) => EpisodeItem(
|
||||||
|
|||||||
@@ -402,15 +402,12 @@ class _EpisodePanelState extends CommonSlidePageState<EpisodePanel> {
|
|||||||
if (!widget.showTitle) {
|
if (!widget.showTitle) {
|
||||||
_currentItemIndex = index;
|
_currentItemIndex = index;
|
||||||
}
|
}
|
||||||
|
final isEpisode = episode is ugc.BaseEpisodeItem;
|
||||||
widget.changeFucCall(
|
widget.changeFucCall(
|
||||||
episode is pgc.EpisodeItem ? episode.epId : null,
|
episode is pgc.EpisodeItem ? episode.epId : null,
|
||||||
episode.runtimeType.toString() == "EpisodeItem"
|
isEpisode ? episode.bvid : widget.bvid,
|
||||||
? episode.bvid
|
|
||||||
: widget.bvid,
|
|
||||||
episode.cid,
|
episode.cid,
|
||||||
episode.runtimeType.toString() == "EpisodeItem"
|
isEpisode ? episode.aid : widget.aid,
|
||||||
? episode.aid
|
|
||||||
: widget.aid,
|
|
||||||
cover,
|
cover,
|
||||||
);
|
);
|
||||||
if (widget.type == EpisodeType.season) {
|
if (widget.type == EpisodeType.season) {
|
||||||
|
|||||||
@@ -2148,14 +2148,16 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void changeEpisode(episode) {
|
void changeEpisode(episode) {
|
||||||
|
final isEpisode = episode is BaseEpisodeItem;
|
||||||
|
final isPgc = episode is pgc.EpisodeItem;
|
||||||
videoIntroController.changeSeasonOrbangu(
|
videoIntroController.changeSeasonOrbangu(
|
||||||
episode is pgc.EpisodeItem ? episode.epId : null,
|
isPgc ? episode.epId : null,
|
||||||
episode.runtimeType.toString() == "EpisodeItem" ? episode.bvid : bvid,
|
isEpisode ? episode.bvid : bvid,
|
||||||
episode.cid,
|
episode.cid,
|
||||||
episode.runtimeType.toString() == "EpisodeItem" ? episode.aid : aid,
|
isEpisode ? episode.aid : aid,
|
||||||
episode is EpisodeItem
|
episode is EpisodeItem
|
||||||
? episode.arc?.pic
|
? episode.arc?.pic
|
||||||
: episode is pgc.EpisodeItem
|
: isPgc
|
||||||
? episode.cover
|
? episode.cover
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user