Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee8c0b8888 | ||
|
|
64ef4915b8 | ||
|
|
1f655ed7b6 |
@@ -12,7 +12,7 @@
|
||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||
<Authors>CodeDevMLH</Authors>
|
||||
<Version>1.6.1.28</Version>
|
||||
<Version>1.6.1.29</Version>
|
||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -1258,9 +1258,20 @@ const ApiUtils = {
|
||||
*/
|
||||
async fetchSponsorBlockData(videoId) {
|
||||
if (!CONFIG.useSponsorBlock) return { intro: null, outro: null };
|
||||
|
||||
// Return cached result if available
|
||||
if (!this._sponsorBlockCache) this._sponsorBlockCache = {};
|
||||
if (this._sponsorBlockCache[videoId]) {
|
||||
return this._sponsorBlockCache[videoId];
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://sponsor.ajay.app/api/skipSegments?videoID=${videoId}&categories=["intro","outro"]`);
|
||||
if (!response.ok) return { intro: null, outro: null };
|
||||
if (!response.ok) {
|
||||
const result = { intro: null, outro: null };
|
||||
this._sponsorBlockCache[videoId] = result;
|
||||
return result;
|
||||
}
|
||||
|
||||
const segments = await response.json();
|
||||
let intro = null;
|
||||
@@ -1274,7 +1285,9 @@ const ApiUtils = {
|
||||
}
|
||||
});
|
||||
|
||||
return { intro, outro };
|
||||
const result = { intro, outro };
|
||||
this._sponsorBlockCache[videoId] = result;
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.warn('Error fetching SponsorBlock data:', error);
|
||||
return { intro: null, outro: null };
|
||||
@@ -1763,7 +1776,11 @@ const SlideCreator = {
|
||||
if (event.data === YT.PlayerState.ENDED) {
|
||||
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
|
||||
if (slide && slide.classList.contains('active')) {
|
||||
SlideshowManager.nextSlide();
|
||||
if (CONFIG.waitForTrailerToEnd) {
|
||||
SlideshowManager.nextSlide();
|
||||
} else {
|
||||
event.target.playVideo(); // Loop if trailer is shorter than slide duration
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2281,25 +2298,25 @@ const SlideshowManager = {
|
||||
|
||||
if (previousVisibleSlide) {
|
||||
previousVisibleSlide.classList.remove("active");
|
||||
previousVisibleSlide.setAttribute("inert", "");
|
||||
previousVisibleSlide.setAttribute("tabindex", "-1");
|
||||
// previousVisibleSlide.setAttribute("inert", "");
|
||||
// previousVisibleSlide.setAttribute("tabindex", "-1");
|
||||
}
|
||||
|
||||
currentSlide.classList.add("active");
|
||||
currentSlide.removeAttribute("inert");
|
||||
currentSlide.setAttribute("tabindex", "0");
|
||||
// currentSlide.removeAttribute("inert");
|
||||
// currentSlide.setAttribute("tabindex", "0");
|
||||
|
||||
// Update Play/Pause Button State if it was paused
|
||||
if (STATE.slideshow.isPaused) {
|
||||
STATE.slideshow.isPaused = false;
|
||||
const pauseButton = document.querySelector('.pause-button');
|
||||
if (pauseButton) {
|
||||
pauseButton.innerHTML = '<i class="material-icons">pause</i>';
|
||||
const pauseLabel = LocalizationUtils.getLocalizedString('ButtonPause', 'Pause');
|
||||
pauseButton.setAttribute("aria-label", pauseLabel);
|
||||
pauseButton.setAttribute("title", pauseLabel);
|
||||
}
|
||||
}
|
||||
// // Update Play/Pause Button State if it was paused
|
||||
// if (STATE.slideshow.isPaused) {
|
||||
// STATE.slideshow.isPaused = false;
|
||||
// const pauseButton = document.querySelector('.pause-button');
|
||||
// if (pauseButton) {
|
||||
// pauseButton.innerHTML = '<i class="material-icons">pause</i>';
|
||||
// const pauseLabel = LocalizationUtils.getLocalizedString('ButtonPause', 'Pause');
|
||||
// pauseButton.setAttribute("aria-label", pauseLabel);
|
||||
// pauseButton.setAttribute("title", pauseLabel);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Manage Video Playback: Stop others, Play current
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||
"versions": [
|
||||
{
|
||||
"version": "1.6.1.28",
|
||||
"version": "1.6.1.29",
|
||||
"changelog": "- fix tv mode issue\n- refactor video playback management",
|
||||
"targetAbi": "10.11.0.0",
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.28/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "2b44f2ee7399b70c4bfdaae33ff80437",
|
||||
"timestamp": "2026-02-14T14:38:40Z"
|
||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.29/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||
"checksum": "6bdae85c590e90948a79984b56f93fa0",
|
||||
"timestamp": "2026-02-14T15:04:20Z"
|
||||
},
|
||||
{
|
||||
"version": "1.6.0.2",
|
||||
|
||||
Reference in New Issue
Block a user