mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: 稍后再看&收藏夹播放全部
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -121,7 +121,7 @@ class VideoIntroController extends GetxController
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
|
||||
// 获取视频简介&分p
|
||||
void queryVideoIntro() async {
|
||||
Future queryVideoIntro() async {
|
||||
await queryVideoTags();
|
||||
var result = await VideoHttp.videoIntro(bvid: bvid);
|
||||
if (result['status']) {
|
||||
@@ -649,7 +649,13 @@ class VideoIntroController extends GetxController
|
||||
bool nextPlay() {
|
||||
final List episodes = [];
|
||||
bool isPages = false;
|
||||
if ((videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
final VideoDetailController videoDetailCtr =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
|
||||
if (videoDetailController.sourceType.value == 'watchLater' ||
|
||||
videoDetailController.sourceType.value == 'fav') {
|
||||
episodes.addAll(videoDetailCtr.mediaList);
|
||||
} else if ((videoDetail.value.pages?.length ?? 0) > 1) {
|
||||
isPages = true;
|
||||
final List<Part> pages = videoDetail.value.pages!;
|
||||
episodes.addAll(pages);
|
||||
@@ -661,8 +667,7 @@ class VideoIntroController extends GetxController
|
||||
episodes.addAll(episodesList);
|
||||
}
|
||||
}
|
||||
final VideoDetailController videoDetailCtr =
|
||||
Get.find<VideoDetailController>(tag: heroTag);
|
||||
|
||||
final PlayRepeat platRepeat = videoDetailCtr.plPlayerController.playRepeat;
|
||||
|
||||
if (episodes.isEmpty) {
|
||||
@@ -676,6 +681,13 @@ class VideoIntroController extends GetxController
|
||||
episodes.indexWhere((e) => e.cid == lastPlayCid.value);
|
||||
int nextIndex = currentIndex + 1;
|
||||
|
||||
int cid = episodes[nextIndex].cid!;
|
||||
while (cid == -1) {
|
||||
nextIndex++;
|
||||
SmartDialog.showToast('当前视频暂不支持播放,自动跳过');
|
||||
cid = episodes[nextIndex].cid!;
|
||||
}
|
||||
|
||||
// 列表循环
|
||||
if (nextIndex >= episodes.length) {
|
||||
if (platRepeat == PlayRepeat.listCycle) {
|
||||
@@ -686,7 +698,6 @@ class VideoIntroController extends GetxController
|
||||
return false;
|
||||
}
|
||||
}
|
||||
final int cid = episodes[nextIndex].cid!;
|
||||
final String rBvid = isPages ? bvid : episodes[nextIndex].bvid;
|
||||
final int rAid = isPages ? IdUtils.bv2av(bvid) : episodes[nextIndex].aid!;
|
||||
changeSeasonOrbangu(null, rBvid, cid, rAid, null);
|
||||
|
||||
Reference in New Issue
Block a user