mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
fix: seek preview index
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1511,7 +1511,13 @@ Widget buildSeekPreviewWidget(PlPlayerController plPlayerController) {
|
||||
.clamp(8, constraints.maxWidth - 48 * scale - 8);
|
||||
|
||||
// index
|
||||
int index = plPlayerController.sliderPositionSeconds.value ~/ 5;
|
||||
// int index = plPlayerController.sliderPositionSeconds.value ~/ 5;
|
||||
int index = (List<int>.from(
|
||||
plPlayerController.videoShot!['data']['index'])
|
||||
.where((item) =>
|
||||
item <= plPlayerController.sliderPositionSeconds.value)
|
||||
.length -
|
||||
2);
|
||||
|
||||
// pageIndex
|
||||
int pageIndex = (index ~/ 100).clamp(
|
||||
@@ -1560,7 +1566,8 @@ Widget buildSeekPreviewWidget(PlPlayerController plPlayerController) {
|
||||
),
|
||||
),
|
||||
);
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('seek preview: $e');
|
||||
return SizedBox.shrink(
|
||||
key: ValueKey(plPlayerController.localPosition.value),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user