Backport pull request #5601 from jellyfin-web/release-10.9.z
Fix chapter markers not updating Original-merge: 167515dbf0c4e1a5e754dd817ba017f66c1de501 Merged-by: thornbill <thornbill@users.noreply.github.com> Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
f0c43418da
commit
9813c3efb9
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user