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