feat: progressbar: show viewpoints #28

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-01 16:01:57 +08:00
parent 43977c737b
commit f9ed31c65a
6 changed files with 81 additions and 31 deletions

View File

@@ -607,11 +607,7 @@ class VideoDetailController extends GetxController
.clamp(0.0, 1.0);
double end = (item.segment.second / ((data.timeLength ?? 0) / 1000))
.clamp(0.0, 1.0);
return Segment(
start,
(start == end && end != 0) ? (end + 0.01).clamp(0.0, 1.0) : end,
_getColor(item.segmentType),
);
return Segment(start, end, _getColor(item.segmentType));
}).toList());
} catch (e) {
debugPrint('failed to parse sponsorblock: $e');