mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Change chapter mark classes to include name info.
In order to use different icons depending on the chapter name, the name is provided as a class with the prefix scm-.
This commit is contained in:
parent
20a1c34ea8
commit
b78d6439b0
2 changed files with 18 additions and 8 deletions
|
@ -1574,12 +1574,13 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
|
|||
return '<h1 class="sliderBubbleText">' + datetime.getDisplayRunningTime(ticks) + '</h1>';
|
||||
};
|
||||
|
||||
nowPlayingPositionSlider.getChapterFractions = function () {
|
||||
nowPlayingPositionSlider.getChapterNamesAndFractions = function () {
|
||||
showOsd();
|
||||
|
||||
const item = currentItem;
|
||||
|
||||
if (item && item.Chapters && item.Chapters.length) {
|
||||
const chapterNames = [];
|
||||
const chapterFractions = [];
|
||||
const runtimeDuration = item.RunTimeTicks;
|
||||
|
||||
|
@ -1588,12 +1589,13 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
|
|||
|
||||
const fraction = currentChapter.StartPositionTicks / runtimeDuration;
|
||||
chapterFractions.push(fraction);
|
||||
chapterNames.push(currentChapter.Name);
|
||||
}
|
||||
|
||||
return chapterFractions;
|
||||
return [chapterNames, chapterFractions];
|
||||
}
|
||||
|
||||
return [];
|
||||
return [[], []];
|
||||
};
|
||||
|
||||
view.querySelector('.btnPreviousTrack').addEventListener('click', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue