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,
|
SettingBoxKey.subtitlePreference,
|
||||||
defaultValue: SubtitlePreference.values.first.code,
|
defaultValue: SubtitlePreference.values.first.code,
|
||||||
);
|
);
|
||||||
|
vttSubtitlesIndex = 0;
|
||||||
if (preference == 'on') {
|
if (preference == 'on') {
|
||||||
vttSubtitlesIndex = 1;
|
vttSubtitlesIndex = 1;
|
||||||
} else if (preference == 'withoutAi') {
|
} else if (preference == 'withoutAi') {
|
||||||
@@ -1915,9 +1916,11 @@ class VideoDetailController extends GetxController
|
|||||||
}
|
}
|
||||||
if (plPlayerController.vttSubtitles.isEmpty) {
|
if (plPlayerController.vttSubtitles.isEmpty) {
|
||||||
plPlayerController.vttSubtitles.value = _vttSubtitles;
|
plPlayerController.vttSubtitles.value = _vttSubtitles;
|
||||||
plPlayerController.vttSubtitlesIndex.value = vttSubtitlesIndex!;
|
if (vttSubtitlesIndex != null) {
|
||||||
if (vttSubtitlesIndex != 0) {
|
plPlayerController.vttSubtitlesIndex.value = vttSubtitlesIndex!;
|
||||||
plPlayerController.setSubtitle(vttSubtitlesIndex!);
|
if (vttSubtitlesIndex != 0) {
|
||||||
|
plPlayerController.setSubtitle(vttSubtitlesIndex!);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1988,7 +1991,6 @@ class VideoDetailController extends GetxController
|
|||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
vttSubtitlesIndex = 0;
|
|
||||||
if (res["data"] is List && res["data"].isNotEmpty) {
|
if (res["data"] is List && res["data"].isNotEmpty) {
|
||||||
var result = await VideoHttp.vttSubtitles(res["data"]);
|
var result = await VideoHttp.vttSubtitles(res["data"]);
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ class VideoIntroController extends GetxController
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int currentIndex =
|
final int currentIndex =
|
||||||
episodes.indexWhere((e) => e.cid == lastPlayCid.value);
|
episodes.indexWhere((e) => e.cid == videoDetailCtr.cid.value);
|
||||||
int nextIndex = currentIndex + 1;
|
int nextIndex = currentIndex + 1;
|
||||||
|
|
||||||
if (videoDetailCtr.isPlayAll && currentIndex == episodes.length - 2) {
|
if (videoDetailCtr.isPlayAll && currentIndex == episodes.length - 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user