Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ae59f5da5 | ||
|
|
92eaf91173 | ||
|
|
e7410ec22a | ||
|
|
bb43d1e679 | ||
|
|
b6609d23a2 | ||
|
|
9d4cbf37d3 | ||
|
|
b5e63ef3b7 | ||
|
|
22f9906188 | ||
|
|
ae54ab41a8 | ||
|
|
9663ab78d2 | ||
|
|
f633e4273f | ||
|
|
c0895fd8d7 | ||
|
|
002ccdb08b | ||
|
|
7cb03410ee | ||
|
|
17c8681e93 | ||
|
|
3a4c663c0e | ||
|
|
3385196611 | ||
|
|
2538556f7c | ||
|
|
550ebed942 | ||
|
|
21d55711d4 | ||
|
|
81a0d375be | ||
|
|
23cbc0a85a | ||
|
|
2de066cca8 | ||
|
|
138e50ff15 | ||
|
|
bf72dc08a3 | ||
|
|
65a63b4aa0 | ||
|
|
a1df756c56 | ||
|
|
f2d383ec61 |
@@ -118,7 +118,7 @@
|
|||||||
<label class="inputLabel inputLabelUnfocused" for="CustomMediaIds">Default Media/Collection/Playlist
|
<label class="inputLabel inputLabelUnfocused" for="CustomMediaIds">Default Media/Collection/Playlist
|
||||||
IDs
|
IDs
|
||||||
(Newline or Comma separated)</label>
|
(Newline or Comma separated)</label>
|
||||||
<textarea is="emby-textarea" id="CustomMediaIds" name="CustomMediaIds"
|
<textarea class="emby-textarea" is="emby-textarea" id="CustomMediaIds" name="CustomMediaIds"
|
||||||
style="width: 100%; height: 150px; font-family: monospace;"></textarea>
|
style="width: 100%; height: 150px; font-family: monospace;"></textarea>
|
||||||
<div class="fieldDescription">Enter the IDs of the items you want to show in the slideshow as
|
<div class="fieldDescription">Enter the IDs of the items you want to show in the slideshow as
|
||||||
your default content.
|
your default content.
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
<div id="seasonalSectionsList"></div>
|
<div id="seasonalSectionsList"></div>
|
||||||
<button is="emby-button" type="button" id="addSeasonBtn" class="raised emby-button"
|
<button is="emby-button" type="button" id="addSeasonBtn" class="raised emby-button"
|
||||||
style="margin-top: 1em; display: inline-flex; align-items: center; gap: 0.4em;">
|
style="margin-top: 1em; display: inline-flex; align-items: center; gap: 0.4em;">
|
||||||
<i class="md-icon">add</i>
|
<i class="material-icons" style="font-size: 24px;">add</i>
|
||||||
<span>Add Season</span>
|
<span>Add Season</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<label class="selectLabel" for="PreferredVideoQuality">Preferred YouTube Quality</label>
|
<label class="selectLabel" for="PreferredVideoQuality">Preferred YouTube Quality</label>
|
||||||
<select is="emby-select" id="PreferredVideoQuality" name="PreferredVideoQuality" class="selectLayout emby-select-withcolor emby-select">
|
<select is="emby-select" id="PreferredVideoQuality" name="PreferredVideoQuality" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
||||||
<option value="Auto">Auto (Smart)</option>
|
<option value="Auto">Auto (Smart)</option>
|
||||||
<option value="Maximum">Maximum (4K+)</option>
|
<option value="Maximum">Maximum (4K+)</option>
|
||||||
<option value="1080p">1080p</option>
|
<option value="1080p">1080p</option>
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
<h2 class="sectionTitle">Content Sorting</h2>
|
<h2 class="sectionTitle">Content Sorting</h2>
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<label class="selectLabel" for="SortBy">Sort By</label>
|
<label class="selectLabel" for="SortBy">Sort By</label>
|
||||||
<select is="emby-select" id="SortBy" name="SortBy" class="selectLayout emby-select-withcolor emby-select">
|
<select is="emby-select" id="SortBy" name="SortBy" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
||||||
<option value="Random">Random</option>
|
<option value="Random">Random</option>
|
||||||
<option value="Original">Original (Custom List Order)</option>
|
<option value="Original">Original (Custom List Order)</option>
|
||||||
<option value="PremiereDate">Premiere Date</option>
|
<option value="PremiereDate">Premiere Date</option>
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="selectContainer">
|
<div class="selectContainer">
|
||||||
<label class="selectLabel" for="SortOrder">Sort Order</label>
|
<label class="selectLabel" for="SortOrder">Sort Order</label>
|
||||||
<select is="emby-select" id="SortOrder" name="SortOrder" class="selectLayout emby-select-withcolor emby-select">
|
<select is="emby-select" id="SortOrder" name="SortOrder" class="selectLayout emby-select-withcolor emby-select" style="width: 100%; -webkit-appearance: menulist; appearance: menulist;">
|
||||||
<option value="Ascending">Ascending</option>
|
<option value="Ascending">Ascending</option>
|
||||||
<option value="Descending">Descending</option>
|
<option value="Descending">Descending</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -534,23 +534,24 @@
|
|||||||
var container = page.querySelector('#seasonalSectionsList');
|
var container = page.querySelector('#seasonalSectionsList');
|
||||||
if (!container) return;
|
if (!container) return;
|
||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
sections.forEach(function(section) {
|
sections.forEach(function(section, index) {
|
||||||
MediaBarEnhancedConfigurationPage.createSectionElement(container, section);
|
MediaBarEnhancedConfigurationPage.createSectionElement(container, section, index + 1);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
addSeasonalSection: function(page) {
|
addSeasonalSection: function(page) {
|
||||||
var container = page.querySelector('#seasonalSectionsList');
|
var container = page.querySelector('#seasonalSectionsList');
|
||||||
if (!container) return;
|
if (!container) return;
|
||||||
|
var index = container.children.length + 1;
|
||||||
MediaBarEnhancedConfigurationPage.createSectionElement(container, {
|
MediaBarEnhancedConfigurationPage.createSectionElement(container, {
|
||||||
Name: 'New Season',
|
Name: 'New Season',
|
||||||
StartDay: 1, StartMonth: 1,
|
StartDay: 1, StartMonth: 1,
|
||||||
EndDay: 1, EndMonth: 1,
|
EndDay: 1, EndMonth: 1,
|
||||||
MediaIds: ''
|
MediaIds: ''
|
||||||
});
|
}, index);
|
||||||
},
|
},
|
||||||
|
|
||||||
createSectionElement: function(container, data) {
|
createSectionElement: function(container, data, index) {
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.className = 'seasonal-section';
|
div.className = 'seasonal-section';
|
||||||
div.style.cssText = 'background: rgba(0,0,0,0.2); padding: 1em; margin-bottom: 1em; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);';
|
div.style.cssText = 'background: rgba(0,0,0,0.2); padding: 1em; margin-bottom: 1em; border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);';
|
||||||
@@ -564,7 +565,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
function mkSelect(val, opts, cls) {
|
function mkSelect(val, opts, cls) {
|
||||||
var h = '<select class="emby-select ' + cls + '" style="width: auto; display: inline-block; margin-right: 5px;">';
|
var h = '<select class="emby-select emby-select-withcolor ' + cls + '" style="width: auto; display: inline-block; margin-right: 5px; -webkit-appearance: menulist; appearance: menulist;">';
|
||||||
opts.forEach(function(o) {
|
opts.forEach(function(o) {
|
||||||
var v = o.v || o;
|
var v = o.v || o;
|
||||||
var n = o.n || o;
|
var n = o.n || o;
|
||||||
@@ -574,21 +575,36 @@
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.innerHTML = `
|
var labelText = 'Season list #' + (index || 1);
|
||||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5em;">
|
|
||||||
<input is="emby-input" type="text" class="emby-input section-name" value="${data.Name}" placeholder="Season Name" style="flex: 1; margin-right: 1em; font-weight: bold;">
|
div.innerHTML =
|
||||||
<button type="button" class="raised emby-button remove-section" style="background: #a94442;">Remove</button>
|
'<div class="inputContainer" style="margin-bottom: 0.5em;">' +
|
||||||
</div>
|
' <label class="inputLabel" style="font-size: 1.2em; font-weight: bold; margin-bottom:0.5em; display:block;">' + labelText + '</label>' +
|
||||||
<div style="margin-bottom: 0.5em; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em;">
|
' <div style="display: flex; align-items: center;">' +
|
||||||
<span>From:</span>
|
' <div style="flex-grow:1;">' +
|
||||||
${mkSelect(data.StartDay, days, 'start-day')}
|
' <input is="emby-input" type="text" class="emby-input section-name" value="' + (data.Name || '') + '" />' +
|
||||||
${mkSelect(data.StartMonth, months, 'start-month')}
|
' </div>' +
|
||||||
<span style="margin-left: 1em;">To:</span>
|
' <button type="button" class="raised emby-button remove-section" style="background: #a94442; min-width: unset; margin-left: 1em;">Remove</button>' +
|
||||||
${mkSelect(data.EndDay, days, 'end-day')}
|
' </div>' +
|
||||||
${mkSelect(data.EndMonth, months, 'end-month')}
|
' <div class="fieldDescription">Name of the season</div>' +
|
||||||
</div>
|
'</div>' +
|
||||||
<textarea is="emby-textarea" class="emby-textarea section-ids" style="width: 100%; height: 80px; font-family: monospace;" placeholder="Media IDs...">${data.MediaIds || ''}</textarea>
|
'<div class="inputContainer" style="margin-bottom: 1em;">' +
|
||||||
`;
|
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">Active Period</label>' +
|
||||||
|
' <div style="display: flex; align-items: center; flex-wrap: wrap; gap: 0.5em;">' +
|
||||||
|
' <span>From:</span>' +
|
||||||
|
mkSelect(data.StartDay, days, 'start-day') +
|
||||||
|
mkSelect(data.StartMonth, months, 'start-month') +
|
||||||
|
' <span style="margin-left: 1em;">To:</span>' +
|
||||||
|
mkSelect(data.EndDay, days, 'end-day') +
|
||||||
|
mkSelect(data.EndMonth, months, 'end-month') +
|
||||||
|
' </div>' +
|
||||||
|
' <div class="fieldDescription">Date range (inclusive) when this content is active.</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div class="inputContainer">' +
|
||||||
|
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">Media IDs</label>' +
|
||||||
|
' <textarea is="emby-textarea" class="emby-textarea section-ids" style="width: 100%; height: 80px; font-family: monospace;">' + (data.MediaIds || '') + '</textarea>' +
|
||||||
|
' <div class="fieldDescription">Comma-separated list of Movie/Series/Collection IDs to show during this season.</div>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
div.querySelector('.remove-section').addEventListener('click', function() {
|
div.querySelector('.remove-section').addEventListener('click', function() {
|
||||||
div.remove();
|
div.remove();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
|
||||||
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
|
||||||
<Authors>CodeDevMLH</Authors>
|
<Authors>CodeDevMLH</Authors>
|
||||||
<Version>1.6.1.9</Version>
|
<Version>1.6.1.17</Version>
|
||||||
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -1743,14 +1743,15 @@ const SlideCreator = {
|
|||||||
const isVideoPlayerOpen = document.querySelector('.videoPlayerContainer') || document.querySelector('.youtubePlayerContainer');
|
const isVideoPlayerOpen = document.querySelector('.videoPlayerContainer') || document.querySelector('.youtubePlayerContainer');
|
||||||
|
|
||||||
if (slide && slide.classList.contains('active') && !document.hidden && (!isVideoPlayerOpen || isVideoPlayerOpen.classList.contains('hide'))) {
|
if (slide && slide.classList.contains('active') && !document.hidden && (!isVideoPlayerOpen || isVideoPlayerOpen.classList.contains('hide'))) {
|
||||||
const currentIndex = STATE.slideshow.currentSlideIndex;
|
// MARK: mark
|
||||||
const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
// const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||||
if (currentItemId !== itemId) {
|
// const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||||
console.log(`Slide ${itemId} is no longer active (current: ${currentItemId}), aborting playback.`);
|
// if (currentItemId !== itemId) {
|
||||||
event.target.mute(); // Mute just in case
|
// console.log(`Slide ${itemId} is no longer active (current: ${currentItemId}), aborting playback.`);
|
||||||
return;
|
// event.target.mute(); // Mute just in case
|
||||||
}
|
// return;
|
||||||
event.target.playVideo();
|
// }
|
||||||
|
event.target.playVideo();
|
||||||
|
|
||||||
// Check if it actually started playing after a short delay (handling autoplay blocks)
|
// Check if it actually started playing after a short delay (handling autoplay blocks)
|
||||||
const timeoutId = setTimeout(() => {
|
const timeoutId = setTimeout(() => {
|
||||||
@@ -1808,6 +1809,7 @@ const SlideCreator = {
|
|||||||
autoplay: false,
|
autoplay: false,
|
||||||
preload: "auto",
|
preload: "auto",
|
||||||
loop: false,
|
loop: false,
|
||||||
|
disablePictureInPicture: true,
|
||||||
style: "object-fit: cover; object-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none;"
|
style: "object-fit: cover; object-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; pointer-events: none;"
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1825,10 +1827,13 @@ const SlideCreator = {
|
|||||||
|
|
||||||
backdrop.addEventListener('play', (event) => {
|
backdrop.addEventListener('play', (event) => {
|
||||||
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
|
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
|
||||||
const currentIndex = STATE.slideshow.currentSlideIndex;
|
// MARK: mark
|
||||||
const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
// const currentIndex = STATE.slideshow.currentSlideIndex;
|
||||||
|
// const currentItemId = STATE.slideshow.itemIds[currentIndex];
|
||||||
|
|
||||||
if (!slide || !slide.classList.contains('active') || currentItemId !== itemId) {
|
// if (!slide || !slide.classList.contains('active') || currentItemId !== itemId) {
|
||||||
|
|
||||||
|
if (!slide || !slide.classList.contains('active')) {
|
||||||
console.log(`Local video ${itemId} started playing but is not active, pausing.`);
|
console.log(`Local video ${itemId} started playing but is not active, pausing.`);
|
||||||
event.target.pause();
|
event.target.pause();
|
||||||
event.target.currentTime = 0;
|
event.target.currentTime = 0;
|
||||||
@@ -2313,7 +2318,7 @@ const SlideshowManager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
currentSlide.classList.add("active");
|
currentSlide.classList.add("active");
|
||||||
|
|
||||||
// Restore focus for TV mode navigation continuity
|
// Restore focus for TV mode navigation continuity
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
if (focusSelector) {
|
if (focusSelector) {
|
||||||
@@ -2432,6 +2437,8 @@ const SlideshowManager = {
|
|||||||
// Preload next slides
|
// Preload next slides
|
||||||
for (let i = 1; i <= preloadCount; i++) {
|
for (let i = 1; i <= preloadCount; i++) {
|
||||||
const nextIndex = (currentIndex + i) % totalItems;
|
const nextIndex = (currentIndex + i) % totalItems;
|
||||||
|
if (nextIndex === currentIndex) break;
|
||||||
|
|
||||||
const itemId = STATE.slideshow.itemIds[nextIndex];
|
const itemId = STATE.slideshow.itemIds[nextIndex];
|
||||||
SlideCreator.createSlideForItemId(itemId);
|
SlideCreator.createSlideForItemId(itemId);
|
||||||
}
|
}
|
||||||
@@ -2439,6 +2446,8 @@ const SlideshowManager = {
|
|||||||
// Preload previous slides
|
// Preload previous slides
|
||||||
for (let i = 1; i <= preloadCount; i++) {
|
for (let i = 1; i <= preloadCount; i++) {
|
||||||
const prevIndex = (currentIndex - i + totalItems) % totalItems;
|
const prevIndex = (currentIndex - i + totalItems) % totalItems;
|
||||||
|
if (prevIndex === currentIndex) break;
|
||||||
|
|
||||||
const prevItemId = STATE.slideshow.itemIds[prevIndex];
|
const prevItemId = STATE.slideshow.itemIds[prevIndex];
|
||||||
SlideCreator.createSlideForItemId(prevItemId);
|
SlideCreator.createSlideForItemId(prevItemId);
|
||||||
}
|
}
|
||||||
@@ -2703,7 +2712,7 @@ const SlideshowManager = {
|
|||||||
|
|
||||||
videoBackdrop.play().catch(() => {
|
videoBackdrop.play().catch(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (videoBackdrop.paused && slide.classList.contains('active')) {
|
if (videoBackdrop.paused) {
|
||||||
console.warn(`Autoplay blocked for ${itemId}, attempting muted fallback`);
|
console.warn(`Autoplay blocked for ${itemId}, attempting muted fallback`);
|
||||||
videoBackdrop.muted = true;
|
videoBackdrop.muted = true;
|
||||||
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
videoBackdrop.play().catch(err => console.error("Muted fallback failed", err));
|
||||||
@@ -2714,7 +2723,7 @@ const SlideshowManager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// YouTube player
|
// YouTube player
|
||||||
const player = STATE.slideshow.videoPlayers?.[itemId];
|
const player = STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[itemId];
|
||||||
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
|
||||||
player.loadVideoById({
|
player.loadVideoById({
|
||||||
videoId: player._videoId,
|
videoId: player._videoId,
|
||||||
@@ -2722,9 +2731,6 @@ const SlideshowManager = {
|
|||||||
endSeconds: player._endTime
|
endSeconds: player._endTime
|
||||||
});
|
});
|
||||||
|
|
||||||
// Explicitly call playVideo to ensure it starts
|
|
||||||
player.playVideo();
|
|
||||||
|
|
||||||
if (STATE.slideshow.isMuted) {
|
if (STATE.slideshow.isMuted) {
|
||||||
player.mute();
|
player.mute();
|
||||||
} else {
|
} else {
|
||||||
@@ -2733,8 +2739,6 @@ const SlideshowManager = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!slide.classList.contains('active')) return;
|
|
||||||
|
|
||||||
if (player.getPlayerState &&
|
if (player.getPlayerState &&
|
||||||
player.getPlayerState() !== YT.PlayerState.PLAYING &&
|
player.getPlayerState() !== YT.PlayerState.PLAYING &&
|
||||||
player.getPlayerState() !== YT.PlayerState.BUFFERING) {
|
player.getPlayerState() !== YT.PlayerState.BUFFERING) {
|
||||||
@@ -2744,6 +2748,12 @@ const SlideshowManager = {
|
|||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
return true;
|
return true;
|
||||||
|
} else if (player && typeof player.seekTo === 'function') {
|
||||||
|
// Fallback if loadVideoById is not available or videoId missing but player object exists
|
||||||
|
const startTime = player._startTime || 0;
|
||||||
|
player.seekTo(startTime);
|
||||||
|
player.playVideo();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
|
||||||
"versions": [
|
"versions": [
|
||||||
{
|
{
|
||||||
"version": "1.6.1.9",
|
"version": "1.6.1.17",
|
||||||
"changelog": "- fix tv mode issue\n- refactor video playback management",
|
"changelog": "- fix tv mode issue\n- refactor video playback management",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.9/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.6.1.17/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "e6e3b72fe679d90137617d8a717592b8",
|
"checksum": "4f0f1b0bfcb073ae72c6a5ba3b991e65",
|
||||||
"timestamp": "2026-02-13T00:16:39Z"
|
"timestamp": "2026-02-13T13:49:22Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.6.0.2",
|
"version": "1.6.0.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user