mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5601 from jellyfin-web/release-10.9.z
Fix chapter markers not updating
Original-merge: 167515dbf0
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
f0c43418da
commit
9813c3efb9
2 changed files with 18 additions and 22 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue