Compare commits
4 Commits
b2dbd6df45
...
v1.7.1.14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ff4f081f3 | ||
|
|
4a07c22091 | ||
|
|
4d1d442746 | ||
|
|
1df2b341e5 |
@@ -49,5 +49,9 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
|
|||||||
public bool IncludeWatchedContent { get; set; } = false;
|
public bool IncludeWatchedContent { get; set; } = false;
|
||||||
public string SortBy { get; set; } = "Random";
|
public string SortBy { get; set; } = "Random";
|
||||||
public string SortOrder { get; set; } = "Ascending";
|
public string SortOrder { get; set; } = "Ascending";
|
||||||
|
|
||||||
|
public bool EnableCustomOverlay { get; set; } = false;
|
||||||
|
public string CustomOverlayText { get; set; } = "";
|
||||||
|
public string CustomOverlayImageUrl { get; set; } = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,6 +212,29 @@
|
|||||||
|
|
||||||
<!-- ADVANCED TAB -->
|
<!-- ADVANCED TAB -->
|
||||||
<div id="media-bar-enhanced-advanced" class="tab-content" style="display:none;">
|
<div id="media-bar-enhanced-advanced" class="tab-content" style="display:none;">
|
||||||
|
<h2 class="sectionTitle">Custom Slideshow Overlay</h2>
|
||||||
|
<p>Inject a custom text or floating image over the slideshow. This can be overridden by specific Seasonal Sections.</p>
|
||||||
|
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input is="emby-checkbox" type="checkbox" id="EnableCustomOverlay" name="EnableCustomOverlay" />
|
||||||
|
<span>Enable Custom Overlay</span>
|
||||||
|
</label>
|
||||||
|
<div class="fieldDescription">If enabled, the text or image below will hover over the slideshow globally.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" type="text" id="CustomOverlayText" name="CustomOverlayText" />
|
||||||
|
<div class="fieldDescription">Text to display on the overlay (e.g. "Movie Night!"). Leave blank to use an image instead.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" type="text" id="CustomOverlayImageUrl" name="CustomOverlayImageUrl" />
|
||||||
|
<div class="fieldDescription">Absolute URL to an image to display on the overlay. If provided, this overrides the text.</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr style="max-width: 800px; margin: 1em 0;">
|
||||||
|
|
||||||
<h2 class="sectionTitle">Features</h2>
|
<h2 class="sectionTitle">Features</h2>
|
||||||
<div class="checkboxContainer checkboxContainer-withDescription">
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
<label>
|
<label>
|
||||||
@@ -534,7 +557,8 @@
|
|||||||
'PreferLocalTrailers', 'ApplyLimitsToCustomIds', 'SeasonalSections',
|
'PreferLocalTrailers', 'ApplyLimitsToCustomIds', 'SeasonalSections',
|
||||||
'PreferLocalBackdrops', 'RandomizeThemeVideos', 'RandomizeLocalTrailers',
|
'PreferLocalBackdrops', 'RandomizeThemeVideos', 'RandomizeLocalTrailers',
|
||||||
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
||||||
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile'
|
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
||||||
|
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Manual mapping for MediaBarIsEnabled -> IsEnabled, to avoid conflicts with other plugins
|
// Manual mapping for MediaBarIsEnabled -> IsEnabled, to avoid conflicts with other plugins
|
||||||
@@ -645,7 +669,8 @@
|
|||||||
'PreferLocalTrailers', 'ApplyLimitsToCustomIds', 'SeasonalSections',
|
'PreferLocalTrailers', 'ApplyLimitsToCustomIds', 'SeasonalSections',
|
||||||
'PreferLocalBackdrops', 'RandomizeThemeVideos', 'RandomizeLocalTrailers',
|
'PreferLocalBackdrops', 'RandomizeThemeVideos', 'RandomizeLocalTrailers',
|
||||||
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
||||||
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile'
|
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
||||||
|
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl'
|
||||||
];
|
];
|
||||||
|
|
||||||
keys.forEach(function (key) {
|
keys.forEach(function (key) {
|
||||||
@@ -681,7 +706,9 @@
|
|||||||
Name: 'New Season',
|
Name: 'New Season',
|
||||||
StartDay: 1, StartMonth: 1,
|
StartDay: 1, StartMonth: 1,
|
||||||
EndDay: 1, EndMonth: 1,
|
EndDay: 1, EndMonth: 1,
|
||||||
MediaIds: ''
|
MediaIds: '',
|
||||||
|
OverlayText: '',
|
||||||
|
OverlayImageUrl: ''
|
||||||
}, index);
|
}, index);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -742,6 +769,14 @@
|
|||||||
' <label class="inputLabel" style="margin-bottom:0.5em; display:block;">Media IDs</label>' +
|
' <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>' +
|
' <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 or Newline separated list of Movie/Series/Collection IDs to show during this season.<br>Same options available as for the default media IDs.</div>' +
|
' <div class="fieldDescription">Comma-separated or Newline separated list of Movie/Series/Collection IDs to show during this season.<br>Same options available as for the default media IDs.</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div class="inputContainer" style="margin-top: 1em;">' +
|
||||||
|
' <input is="emby-input" type="text" class="emby-input section-overlay-text" style="width: 100%;" value="' + (data.OverlayText ? data.OverlayText.replace(/"/g, '"') : '') + '" placeholder="Seasonal Custom Overlay Text (e.g. Oscars Time!)" />' +
|
||||||
|
' <div class="fieldDescription">Optional: Override the global custom overlay text during this season.</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div class="inputContainer">' +
|
||||||
|
' <input is="emby-input" type="text" class="emby-input section-overlay-image" style="width: 100%;" value="' + (data.OverlayImageUrl ? data.OverlayImageUrl.replace(/"/g, '"') : '') + '" placeholder="Seasonal Custom Overlay Image URL" />' +
|
||||||
|
' <div class="fieldDescription">Optional: Override the global custom overlay image during this season. Overrides the text if provided.</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
div.querySelector('.btn-remove').addEventListener('click', function () {
|
div.querySelector('.btn-remove').addEventListener('click', function () {
|
||||||
@@ -786,7 +821,9 @@
|
|||||||
StartMonth: parseInt(el.querySelector('.start-month').value),
|
StartMonth: parseInt(el.querySelector('.start-month').value),
|
||||||
EndDay: parseInt(el.querySelector('.end-day').value),
|
EndDay: parseInt(el.querySelector('.end-day').value),
|
||||||
EndMonth: parseInt(el.querySelector('.end-month').value),
|
EndMonth: parseInt(el.querySelector('.end-month').value),
|
||||||
MediaIds: el.querySelector('.section-ids').value
|
MediaIds: el.querySelector('.section-ids').value,
|
||||||
|
OverlayText: el.querySelector('.section-overlay-text').value,
|
||||||
|
OverlayImageUrl: el.querySelector('.section-overlay-image').value
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return sections;
|
return sections;
|
||||||
|
|||||||
@@ -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.7.1.13</Version>
|
<Version>1.7.1.14</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>
|
||||||
|
|
||||||
|
|||||||
@@ -353,8 +353,14 @@
|
|||||||
right: 0%;
|
right: 0%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.backdrop-container.full-width-video {
|
.backdrop-container.full-width-video {
|
||||||
@@ -377,8 +383,14 @@
|
|||||||
object-position: center 20%;
|
object-position: center 20%;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.backdrop-overlay {
|
.backdrop-overlay {
|
||||||
@@ -390,8 +402,14 @@
|
|||||||
background-color: rgba(0, 0, 0, 0.2);
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 4%, #000000 6%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 4%, #000000 6%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 4%,
|
||||||
|
#000000 6%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 4%,
|
||||||
|
#000000 6%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gradient-overlay {
|
.gradient-overlay {
|
||||||
@@ -405,8 +423,14 @@
|
|||||||
rgba(29, 29, 29, 0.35) 30%,
|
rgba(29, 29, 29, 0.35) 30%,
|
||||||
rgba(29, 29, 29, 0) 100%);
|
rgba(29, 29, 29, 0) 100%);
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 4%, #000000 6%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 4%, #000000 6%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 4%,
|
||||||
|
#000000 6%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 4%,
|
||||||
|
#000000 6%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gradient-overlay.full-width-video {
|
.gradient-overlay.full-width-video {
|
||||||
@@ -509,8 +533,6 @@
|
|||||||
gap: 6px;
|
gap: 6px;
|
||||||
-webkit-tap-highlight-color: #fff0;
|
-webkit-tap-highlight-color: #fff0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-button {
|
.detail-button {
|
||||||
@@ -524,8 +546,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
-webkit-tap-highlight-color: #fff0;
|
-webkit-tap-highlight-color: #fff0;
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.favorite-button {
|
.favorite-button {
|
||||||
@@ -539,8 +559,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
-webkit-tap-highlight-color: #fff0;
|
-webkit-tap-highlight-color: #fff0;
|
||||||
-webkit-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.favorite-button.favorited {
|
.favorite-button.favorited {
|
||||||
@@ -697,8 +715,14 @@
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center 20%;
|
object-position: center 20%;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gradient-overlay {
|
.gradient-overlay {
|
||||||
@@ -710,8 +734,14 @@
|
|||||||
background: rgba(0, 0, 0, 0.25);
|
background: rgba(0, 0, 0, 0.25);
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
mask-image: linear-gradient(to top,
|
||||||
-webkit-mask-image: linear-gradient(to top, rgba(255,255,255,0) 2%, rgba(0,0,0,0.5) 6%, #000000 8%);
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
|
-webkit-mask-image: linear-gradient(to top,
|
||||||
|
rgba(255, 255, 255, 0) 2%,
|
||||||
|
rgba(0, 0, 0, 0.5) 6%,
|
||||||
|
#000000 8%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dots-container {
|
.dots-container {
|
||||||
@@ -982,7 +1012,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-tv .backdrop-container{
|
.layout-tv .backdrop-container {
|
||||||
top: -5%;
|
top: -5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -990,14 +1020,86 @@
|
|||||||
.layout-tv .backdrop.animate {
|
.layout-tv .backdrop.animate {
|
||||||
animation: none !important;
|
animation: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-tv .logo.animate {
|
.layout-tv .logo.animate {
|
||||||
animation: none !important;
|
animation: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layout-tv .slide-counter,
|
.layout-tv .slide-counter,
|
||||||
.layout-tv .dots-container {
|
.layout-tv .dots-container {
|
||||||
backdrop-filter: none;
|
backdrop-filter: none;
|
||||||
-webkit-backdrop-filter: none;
|
-webkit-backdrop-filter: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* Floating Custom Overlay Styling */
|
||||||
|
.custom-overlay-container {
|
||||||
|
position: absolute;
|
||||||
|
top: 8vh;
|
||||||
|
left: 4vw;
|
||||||
|
z-index: 15;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
pointer-events: none; /* Let clicks pass through to the slider */
|
||||||
|
animation: fadeInOverlay 1.5s ease-in-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-overlay-text {
|
||||||
|
font-family: "Archivo Narrow", sans-serif;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), -1px -1px 4px rgba(0, 0, 0, 0.5);
|
||||||
|
margin: 0;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-overlay-image {
|
||||||
|
max-width: 300px;
|
||||||
|
max-height: 120px;
|
||||||
|
object-fit: contain;
|
||||||
|
filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInOverlay {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make it smaller on mobile portrait */
|
||||||
|
@media only screen and (max-width: 767px) and (orientation: portrait) {
|
||||||
|
.custom-overlay-container {
|
||||||
|
top: 5vh;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 90%;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-overlay-text {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-overlay-image {
|
||||||
|
max-width: 200px;
|
||||||
|
max-height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeInOverlay {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translate(-50%, -10px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ const CONFIG = {
|
|||||||
enableKeyboardControls: true,
|
enableKeyboardControls: true,
|
||||||
alwaysShowArrows: false,
|
alwaysShowArrows: false,
|
||||||
hideArrowsOnMobile: true,
|
hideArrowsOnMobile: true,
|
||||||
|
enableCustomOverlay: false,
|
||||||
|
customOverlayText: "",
|
||||||
|
customOverlayImageUrl: "",
|
||||||
enableCustomMediaIds: true,
|
enableCustomMediaIds: true,
|
||||||
enableSeasonalContent: false,
|
enableSeasonalContent: false,
|
||||||
customMediaIds: "",
|
customMediaIds: "",
|
||||||
@@ -3777,6 +3780,88 @@ const slidesInit = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const renderCustomOverlay = () => {
|
||||||
|
let activeOverlayText = CONFIG.customOverlayText;
|
||||||
|
let activeOverlayImage = CONFIG.customOverlayImageUrl;
|
||||||
|
let isSeasonOverride = false;
|
||||||
|
|
||||||
|
if (CONFIG.enableSeasonalContent && CONFIG.seasonalSections) {
|
||||||
|
try {
|
||||||
|
const sections = JSON.parse(CONFIG.seasonalSections || "[]");
|
||||||
|
const now = new Date();
|
||||||
|
const currentMonth = now.getMonth() + 1;
|
||||||
|
const currentDay = now.getDate();
|
||||||
|
|
||||||
|
for (const section of sections) {
|
||||||
|
const startMonth = parseInt(section.StartMonth);
|
||||||
|
const startDay = parseInt(section.StartDay);
|
||||||
|
const endMonth = parseInt(section.EndMonth);
|
||||||
|
const endDay = parseInt(section.EndDay);
|
||||||
|
|
||||||
|
let isActive = false;
|
||||||
|
if (startMonth === endMonth) {
|
||||||
|
if (currentMonth === startMonth && currentDay >= startDay && currentDay <= endDay) {
|
||||||
|
isActive = true;
|
||||||
|
}
|
||||||
|
} else if (startMonth < endMonth) {
|
||||||
|
if (currentMonth > startMonth && currentMonth < endMonth) {
|
||||||
|
isActive = true;
|
||||||
|
} else if (currentMonth === startMonth && currentDay >= startDay) {
|
||||||
|
isActive = true;
|
||||||
|
} else if (currentMonth === endMonth && currentDay <= endDay) {
|
||||||
|
isActive = true;
|
||||||
|
}
|
||||||
|
} else { // Wraps around year
|
||||||
|
if (currentMonth > startMonth || currentMonth < endMonth) {
|
||||||
|
isActive = true;
|
||||||
|
} else if (currentMonth === startMonth && currentDay >= startDay) {
|
||||||
|
isActive = true;
|
||||||
|
} else if (currentMonth === endMonth && currentDay <= endDay) {
|
||||||
|
isActive = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isActive) {
|
||||||
|
if (section.OverlayText || section.OverlayImageUrl) {
|
||||||
|
isSeasonOverride = true;
|
||||||
|
if (section.OverlayText) activeOverlayText = section.OverlayText;
|
||||||
|
if (section.OverlayImageUrl) activeOverlayImage = section.OverlayImageUrl;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error("🎬 Media Bar:", "Error parsing seasonal sections for overlay:", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CONFIG.enableCustomOverlay && !isSeasonOverride) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!activeOverlayText && !activeOverlayImage) return;
|
||||||
|
|
||||||
|
const overlayContainer = document.createElement("div");
|
||||||
|
overlayContainer.className = "custom-overlay-container";
|
||||||
|
|
||||||
|
if (activeOverlayImage) {
|
||||||
|
const img = document.createElement("img");
|
||||||
|
img.className = "custom-overlay-image";
|
||||||
|
img.src = activeOverlayImage;
|
||||||
|
overlayContainer.appendChild(img);
|
||||||
|
} else if (activeOverlayText) {
|
||||||
|
const p = document.createElement("p");
|
||||||
|
p.className = "custom-overlay-text";
|
||||||
|
p.textContent = activeOverlayText;
|
||||||
|
overlayContainer.appendChild(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
const slidesContainer = document.getElementById("slides-container");
|
||||||
|
if (slidesContainer) {
|
||||||
|
slidesContainer.appendChild(overlayContainer);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (CONFIG.enableClientSideSettings) {
|
if (CONFIG.enableClientSideSettings) {
|
||||||
MediaBarEnhancedSettingsManager.init();
|
MediaBarEnhancedSettingsManager.init();
|
||||||
const isClientSideEnabled = MediaBarEnhancedSettingsManager.getSetting('enabled', true);
|
const isClientSideEnabled = MediaBarEnhancedSettingsManager.getSetting('enabled', true);
|
||||||
@@ -3875,6 +3960,8 @@ const slidesInit = async () => {
|
|||||||
|
|
||||||
initArrowNavigation();
|
initArrowNavigation();
|
||||||
|
|
||||||
|
renderCustomOverlay();
|
||||||
|
|
||||||
await SlideshowManager.loadSlideshowData();
|
await SlideshowManager.loadSlideshowData();
|
||||||
|
|
||||||
SlideshowManager.initTouchEvents();
|
SlideshowManager.initTouchEvents();
|
||||||
|
|||||||
@@ -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.7.1.13",
|
"version": "1.7.1.14",
|
||||||
"changelog": "- feat: add option to disable pagination dots/counter\n- feat: add exclude seasonal content from random fetching option\n- Add hide arrows on mobile option \n- fix button issue on mobile when using ElegantFin Theme",
|
"changelog": "- feat: add option to disable pagination dots/counter\n- feat: add exclude seasonal content from random fetching option\n- Add hide arrows on mobile option \n- fix button issue on mobile when using ElegantFin Theme",
|
||||||
"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.7.1.13/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.1.14/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "3eda8e65484a1a75e4f2c0f3da89b182",
|
"checksum": "d4a115b5e3fd192572e21be8e95c55a7",
|
||||||
"timestamp": "2026-03-08T22:50:48Z"
|
"timestamp": "2026-03-09T01:29:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.7.0.14",
|
"version": "1.7.0.14",
|
||||||
|
|||||||
Reference in New Issue
Block a user