mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: vttSubtitlesIndex
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1902,6 +1902,7 @@ class VideoDetailController extends GetxController
|
||||
SettingBoxKey.subtitlePreference,
|
||||
defaultValue: SubtitlePreference.values.first.code,
|
||||
);
|
||||
vttSubtitlesIndex = 0;
|
||||
if (preference == 'on') {
|
||||
vttSubtitlesIndex = 1;
|
||||
} else if (preference == 'withoutAi') {
|
||||
@@ -1915,9 +1916,11 @@ class VideoDetailController extends GetxController
|
||||
}
|
||||
if (plPlayerController.vttSubtitles.isEmpty) {
|
||||
plPlayerController.vttSubtitles.value = _vttSubtitles;
|
||||
plPlayerController.vttSubtitlesIndex.value = vttSubtitlesIndex!;
|
||||
if (vttSubtitlesIndex != 0) {
|
||||
plPlayerController.setSubtitle(vttSubtitlesIndex!);
|
||||
if (vttSubtitlesIndex != null) {
|
||||
plPlayerController.vttSubtitlesIndex.value = vttSubtitlesIndex!;
|
||||
if (vttSubtitlesIndex != 0) {
|
||||
plPlayerController.setSubtitle(vttSubtitlesIndex!);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1988,7 +1991,6 @@ class VideoDetailController extends GetxController
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
vttSubtitlesIndex = 0;
|
||||
if (res["data"] is List && res["data"].isNotEmpty) {
|
||||
var result = await VideoHttp.vttSubtitles(res["data"]);
|
||||
if (result != null) {
|
||||
|
||||
@@ -719,7 +719,7 @@ class VideoIntroController extends GetxController
|
||||
}
|
||||
|
||||
final int currentIndex =
|
||||
episodes.indexWhere((e) => e.cid == lastPlayCid.value);
|
||||
episodes.indexWhere((e) => e.cid == videoDetailCtr.cid.value);
|
||||
int nextIndex = currentIndex + 1;
|
||||
|
||||
if (videoDetailCtr.isPlayAll && currentIndex == episodes.length - 2) {
|
||||
|
||||
Reference in New Issue
Block a user