1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix chapter markers not updating

This commit is contained in:
Bill Thornton 2024-05-24 09:33:22 -04:00
parent bd03c43716
commit 3630ac0436
2 changed files with 18 additions and 22 deletions

View file

@ -1835,21 +1835,11 @@ export default function (view) {
};
nowPlayingPositionSlider.getMarkerInfo = function () {
const markers = [];
const item = currentItem;
// use markers based on chapters
if (item?.Chapters?.length) {
item.Chapters.forEach(currentChapter => {
markers.push({
name: currentChapter.Name,
progress: currentChapter.StartPositionTicks / item.RunTimeTicks
});
});
}
return markers;
return currentItem?.Chapters?.map(currentChapter => ({
name: currentChapter.Name,
progress: currentChapter.StartPositionTicks / currentItem.RunTimeTicks
})) || [];
};
view.querySelector('.btnPreviousTrack').addEventListener('click', function () {