Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c30300d1ba | ||
|
|
387f0dd26f | ||
|
|
71d9cddebb | ||
|
|
9abcdf522d | ||
|
|
8c703ce171 | ||
|
|
a40ee4a40d | ||
|
|
d7e9238e21 | ||
|
|
a296caf70d | ||
|
|
86e9968243 | ||
|
|
e9fe356cee | ||
|
|
e25a99439a | ||
|
|
ba2ad8f2cc | ||
|
|
5274e61204 | ||
|
|
93919c08ef | ||
|
|
c80de82a76 | ||
|
|
c541e1e543 | ||
|
|
2c7dae4d6d | ||
|
|
3869a089a1 | ||
|
|
014c908a1e | ||
|
|
f6cecf6a9e | ||
|
|
81e4643652 | ||
|
|
1b65843b20 | ||
|
|
a70690c0de | ||
|
|
1e21286a66 | ||
|
|
90a64d49ed | ||
|
|
009798ea06 | ||
|
|
53f0f3c401 | ||
|
|
81dad8c6c6 | ||
|
|
66fe4dc3cb | ||
|
|
7be968d1c6 | ||
|
|
2d492f3fed | ||
|
|
2160e2963c | ||
|
|
dc64bbe345 | ||
|
|
3a61b3e548 | ||
|
|
950116a775 | ||
|
|
b9040c20fc | ||
|
|
8388463880 | ||
|
|
233e569c94 | ||
|
|
93c265ffed | ||
|
|
8f4dfa31c8 | ||
|
|
99b8ef316c | ||
|
|
6880ccc9eb | ||
|
|
f77c3fbf71 | ||
|
|
81b28952cc | ||
|
|
911c96216a | ||
|
|
b3b6296798 |
@@ -44,18 +44,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
|
|
||||||
var stream = assembly.GetManifestResourceStream(resourceName);
|
var stream = assembly.GetManifestResourceStream(resourceName);
|
||||||
|
|
||||||
// if (stream == null)
|
|
||||||
// {
|
|
||||||
// // Try fallback/debug matching
|
|
||||||
// var allNames = assembly.GetManifestResourceNames();
|
|
||||||
// var match = Array.Find(allNames, n => n.EndsWith(resourcePath, StringComparison.OrdinalIgnoreCase));
|
|
||||||
|
|
||||||
// if (match != null)
|
|
||||||
// {
|
|
||||||
// stream = assembly.GetManifestResourceStream(match);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (stream == null)
|
if (stream == null)
|
||||||
{
|
{
|
||||||
return NotFound($"Resource not found: {resourceName}");
|
return NotFound($"Resource not found: {resourceName}");
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
|
||||||
namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
||||||
{
|
{
|
||||||
@@ -26,7 +27,7 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Uploads a new custom overlay image.
|
/// Uploads a new custom overlay image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// [Microsoft.AspNetCore.Authorization.Authorize]
|
[Authorize(Policy = "RequiresElevation")]
|
||||||
[HttpPost("OverlayImage")]
|
[HttpPost("OverlayImage")]
|
||||||
[Consumes("multipart/form-data")]
|
[Consumes("multipart/form-data")]
|
||||||
public async Task<IActionResult> UploadImage([FromForm] IFormFile file, [FromQuery] string? filename = null)
|
public async Task<IActionResult> UploadImage([FromForm] IFormFile file, [FromQuery] string? filename = null)
|
||||||
@@ -40,7 +41,7 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
string extension = Path.GetExtension(file.FileName);
|
string extension = Path.GetExtension(file.FileName);
|
||||||
if (string.IsNullOrWhiteSpace(extension)) extension = ".jpg";
|
if (string.IsNullOrWhiteSpace(extension)) extension = ".jpg";
|
||||||
|
|
||||||
// Delete any existing file with this prefix before saving the new one (as extensions might differ)
|
// Delete any existing file with this prefix before saving the new one
|
||||||
string prefix = string.IsNullOrWhiteSpace(filename) ? "custom_overlay_image_global" : $"custom_overlay_image_{filename}";
|
string prefix = string.IsNullOrWhiteSpace(filename) ? "custom_overlay_image_global" : $"custom_overlay_image_{filename}";
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -60,9 +61,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
string targetFileName = $"{prefix}{extension}";
|
string targetFileName = $"{prefix}{extension}";
|
||||||
string targetPath = Path.Combine(_imageDirectory, targetFileName);
|
string targetPath = Path.Combine(_imageDirectory, targetFileName);
|
||||||
|
|
||||||
// Delete is not strictly necessary and can cause locking issues if someone is currently reading it.
|
|
||||||
// FileMode.Create will truncate the file if it exists, effectively overwriting it.
|
|
||||||
// We use FileShare.None to ensure we have exclusive write access, but handle potential IOExceptions gracefully.
|
|
||||||
using (var stream = new FileStream(targetPath, FileMode.Create, FileAccess.Write, FileShare.None))
|
using (var stream = new FileStream(targetPath, FileMode.Create, FileAccess.Write, FileShare.None))
|
||||||
{
|
{
|
||||||
await file.CopyToAsync(stream).ConfigureAwait(false);
|
await file.CopyToAsync(stream).ConfigureAwait(false);
|
||||||
@@ -82,7 +80,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the custom overlay image.
|
/// Retrieves the custom overlay image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// [Microsoft.AspNetCore.Authorization.Authorize]
|
|
||||||
[HttpGet("OverlayImage")]
|
[HttpGet("OverlayImage")]
|
||||||
public IActionResult GetImage([FromQuery] string? filename = null)
|
public IActionResult GetImage([FromQuery] string? filename = null)
|
||||||
{
|
{
|
||||||
@@ -98,7 +95,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
string targetPath = existingFiles[0];
|
string targetPath = existingFiles[0];
|
||||||
|
|
||||||
// Read the file and return with appropriate MIME type
|
// Read the file and return with appropriate MIME type
|
||||||
// We use FileShare.ReadWrite | FileShare.Delete so that if someone is currently overwriting the file (uploading), we don't block them.
|
|
||||||
var stream = new FileStream(targetPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
var stream = new FileStream(targetPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||||
|
|
||||||
string mimeType = "application/octet-stream";
|
string mimeType = "application/octet-stream";
|
||||||
@@ -115,7 +111,7 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes a custom overlay image.
|
/// Deletes a custom overlay image.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// [Microsoft.AspNetCore.Authorization.Authorize]
|
[Authorize(Policy = "RequiresElevation")]
|
||||||
[HttpDelete("OverlayImage")]
|
[HttpDelete("OverlayImage")]
|
||||||
public IActionResult DeleteImage([FromQuery] string? filename = null)
|
public IActionResult DeleteImage([FromQuery] string? filename = null)
|
||||||
{
|
{
|
||||||
@@ -144,7 +140,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Renames a custom overlay image (used when a seasonal section is renamed).
|
/// Renames a custom overlay image (used when a seasonal section is renamed).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// [Microsoft.AspNetCore.Authorization.Authorize]
|
|
||||||
[HttpPut("OverlayImage/Rename")]
|
[HttpPut("OverlayImage/Rename")]
|
||||||
public IActionResult RenameImage([FromQuery] string oldName, [FromQuery] string newName)
|
public IActionResult RenameImage([FromQuery] string oldName, [FromQuery] string newName)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,5 +56,9 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
|
|||||||
public string CustomOverlayStyle { get; set; } = "Shadowed";
|
public string CustomOverlayStyle { get; set; } = "Shadowed";
|
||||||
public string CustomOverlayImageStyle { get; set; } = "None";
|
public string CustomOverlayImageStyle { get; set; } = "None";
|
||||||
public string CustomOverlayPriority { get; set; } = "Image";
|
public string CustomOverlayPriority { get; set; } = "Image";
|
||||||
|
|
||||||
|
public int CustomOverlayPositionX { get; set; } = 0;
|
||||||
|
public int CustomOverlayPositionY { get; set; } = 0;
|
||||||
|
public int CustomOverlayScale { get; set; } = 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,11 +259,11 @@
|
|||||||
<input type="file" id="overlayImageInput" accept="image/png, image/jpeg, image/gif, image/webp" style="display: none;">
|
<input type="file" id="overlayImageInput" accept="image/png, image/jpeg, image/gif, image/webp" style="display: none;">
|
||||||
<img id="overlayImagePreview" style="display: none; max-width: 100%; max-height: 150px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 4px; z-index: 2;" />
|
<img id="overlayImagePreview" style="display: none; max-width: 100%; max-height: 150px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 4px; z-index: 2;" />
|
||||||
<!-- A semi-transparent overlay to clear the image -->
|
<!-- A semi-transparent overlay to clear the image -->
|
||||||
<button type="button" id="clearOverlayImageBtn" is="paper-icon-button-light" style="display: none; position: absolute; top: 10px; right: 10px; z-index: 3; color: #a94442;" title="Clear Image">
|
<button type="button" id="clearOverlayImageBtn" class="clear-btn" is="paper-icon-button-light" style="display: none; position: absolute; top: 10px; right: 10px; z-index: 3; color: #a94442;" title="Clear Image">
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="fieldDescription">Uploading an image will securely save it to the server and automatically update the URL field above.</div>
|
<div class="fieldDescription">Uploading an image will save it to your server and automatically update the URL field above.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 class="sectionTitle" style="margin-top: 1.2em;">Styles</h2>
|
<h2 class="sectionTitle" style="margin-top: 1.2em;">Styles</h2>
|
||||||
@@ -316,7 +316,24 @@
|
|||||||
<div class="fieldDescription">Choose a visual effect to apply to your overlay image.</div>
|
<div class="fieldDescription">Choose a visual effect to apply to your overlay image.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h3 class="sectionTitle" style="margin-top:2em; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.5em;">Layout Tweaks</h3>
|
||||||
|
<div style="display: flex; gap: 1em; flex-wrap: wrap;">
|
||||||
|
<div class="inputContainer" style="flex: 1; min-width: 150px;">
|
||||||
|
<label class="inputLabel inputLabelUnfocused" for="CustomOverlayPositionX">X Offset (% vw)</label>
|
||||||
|
<input is="emby-input" type="number" id="CustomOverlayPositionX" name="CustomOverlayPositionX" min="-50" max="50" step="1" />
|
||||||
|
<div class="fieldDescription">Horizontal nudge (negative = left, positive = right). Default is 0.</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer" style="flex: 1; min-width: 150px;">
|
||||||
|
<label class="inputLabel inputLabelUnfocused" for="CustomOverlayPositionY">Y Offset (% vh)</label>
|
||||||
|
<input is="emby-input" type="number" id="CustomOverlayPositionY" name="CustomOverlayPositionY" min="-50" max="50" step="1" />
|
||||||
|
<div class="fieldDescription">Vertical nudge (negative = up, positive = down). Default is 0.</div>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer" style="flex: 1; min-width: 150px;">
|
||||||
|
<label class="inputLabel inputLabelUnfocused" for="CustomOverlayScale">Scale (%)</label>
|
||||||
|
<input is="emby-input" type="number" id="CustomOverlayScale" name="CustomOverlayScale" min="50" max="200" step="1" />
|
||||||
|
<div class="fieldDescription">Overlay zoom level. Default is 100%.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ADVANCED TAB -->
|
<!-- ADVANCED TAB -->
|
||||||
@@ -645,7 +662,8 @@
|
|||||||
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
||||||
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
||||||
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl',
|
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl',
|
||||||
'CustomOverlayStyle', 'CustomOverlayImageStyle', 'CustomOverlayPriority'
|
'CustomOverlayStyle', 'CustomOverlayImageStyle', 'CustomOverlayPriority',
|
||||||
|
'CustomOverlayPositionX', 'CustomOverlayPositionY', 'CustomOverlayScale'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Manual mapping for MediaBarIsEnabled -> IsEnabled, to avoid conflicts with other plugins
|
// Manual mapping for MediaBarIsEnabled -> IsEnabled, to avoid conflicts with other plugins
|
||||||
@@ -738,7 +756,7 @@
|
|||||||
if (urlInput.value && urlInput.value.trim() !== '') {
|
if (urlInput.value && urlInput.value.trim() !== '') {
|
||||||
previewImg.src = urlInput.value;
|
previewImg.src = urlInput.value;
|
||||||
previewImg.style.display = 'block';
|
previewImg.style.display = 'block';
|
||||||
clearBtn.style.display = 'block';
|
clearBtn.style.display = 'inline-flex';
|
||||||
if(icon) icon.style.display = 'none';
|
if(icon) icon.style.display = 'none';
|
||||||
if(text) {
|
if(text) {
|
||||||
text.textContent = 'Drag and drop a new image here, or click to select';
|
text.textContent = 'Drag and drop a new image here, or click to select';
|
||||||
@@ -889,7 +907,8 @@
|
|||||||
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
'IncludeWatchedContent', 'ShowPaginationDots', 'MaxParentalRating',
|
||||||
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
'MaxDaysRecent', 'ExcludeSeasonalContent', 'HideArrowsOnMobile',
|
||||||
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl',
|
'EnableCustomOverlay', 'CustomOverlayText', 'CustomOverlayImageUrl',
|
||||||
'CustomOverlayStyle', 'CustomOverlayImageStyle', 'CustomOverlayPriority'
|
'CustomOverlayStyle', 'CustomOverlayImageStyle', 'CustomOverlayPriority',
|
||||||
|
'CustomOverlayPositionX', 'CustomOverlayPositionY', 'CustomOverlayScale'
|
||||||
];
|
];
|
||||||
|
|
||||||
keys.forEach(function (key) {
|
keys.forEach(function (key) {
|
||||||
@@ -924,7 +943,7 @@
|
|||||||
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: 31, EndMonth: 1,
|
||||||
MediaIds: '',
|
MediaIds: '',
|
||||||
OverlayText: '',
|
OverlayText: '',
|
||||||
OverlayImageUrl: ''
|
OverlayImageUrl: ''
|
||||||
@@ -1002,12 +1021,12 @@
|
|||||||
' </div>' +
|
' </div>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
' <div class="inputContainer" style="flex: 1; min-width: 250px; margin: 0; padding-bottom: 5px;">' +
|
' <div class="inputContainer" style="flex: 1; min-width: 250px; margin: 0; padding-bottom: 5px;">' +
|
||||||
' <div class="seasonal-dropzone" style="border: 2px dashed rgba(255,255,255,0.2); border-radius: 8px; padding: 1em; text-align: center; cursor: pointer; background: rgba(0,0,0,0.2); transition: all 0.2s ease; position: relative; min-height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center;">' +
|
' <div class="seasonal-dropzone" style="border: 2px dashed rgba(255,255,255,0.2); border-radius: 8px; padding: 1em; text-align: center; cursor: pointer; background: rgba(0,0,0,0.2); transition: all 0.2s ease; position: relative; min-height: 98px; display: flex; flex-direction: column; align-items: center; justify-content: center;">' +
|
||||||
' <i class="material-icons" style="font-size: 24px; color: rgba(255,255,255,0.4); margin-bottom: 4px;">cloud_upload</i>' +
|
' <i class="material-icons" style="font-size: 24px; color: rgba(255,255,255,0.4); margin-bottom: 4px;">cloud_upload</i>' +
|
||||||
' <span style="font-size: 0.85em; color: rgba(255,255,255,0.7);">Upload seasonal image</span>' +
|
' <span style="font-size: 0.85em; color: rgba(255,255,255,0.7);">Upload seasonal image</span>' +
|
||||||
' <input type="file" class="seasonal-file-input" accept="image/png, image/jpeg, image/gif, image/webp" style="display: none;">' +
|
' <input type="file" class="seasonal-file-input" accept="image/png, image/jpeg, image/gif, image/webp" style="display: none;">' +
|
||||||
' <img class="seasonal-preview-img" style="display: none; max-width: 100%; max-height: 100%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 4px; z-index: 2; object-fit: contain;" />' +
|
' <img class="seasonal-preview-img" style="display: none; max-width: 100%; max-height: 100%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 4px; z-index: 2; object-fit: contain;" />' +
|
||||||
' <button type="button" is="paper-icon-button-light" class="seasonal-clear-btn" title="Clear Image" style="display: none; position: absolute; top: 0px; right: 0px; z-index: 3; color: #a94442;"><i class="material-icons">delete</i></button>' +
|
' <button type="button" is="paper-icon-button-light" class="seasonal-clear-btn remove-img" title="Clear Image" style="background: transparent; border: none; padding: 0; cursor: pointer; display: none; position: absolute; top: 10px; right: 10px; z-index: 3; color: #a94442;"><i class="material-icons">delete</i></button>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
' </div>' +
|
' </div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
@@ -1079,7 +1098,7 @@
|
|||||||
if (val) {
|
if (val) {
|
||||||
previewImg.src = val;
|
previewImg.src = val;
|
||||||
previewImg.style.display = 'block';
|
previewImg.style.display = 'block';
|
||||||
clearBtn.style.display = 'block';
|
clearBtn.style.display = 'inline-flex';
|
||||||
if(icon) icon.style.display = 'none';
|
if(icon) icon.style.display = 'none';
|
||||||
if(text) {
|
if(text) {
|
||||||
text.textContent = 'Drag and drop a new image here, or click to select';
|
text.textContent = 'Drag and drop a new image here, or click to select';
|
||||||
|
|||||||
@@ -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.2.6</Version>
|
<Version>1.8.1.2</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>
|
||||||
|
|
||||||
|
|||||||
@@ -749,6 +749,15 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%) scale(0.8);
|
transform: translateX(-50%) scale(0.8);
|
||||||
background-color: #ffffff00;
|
background-color: #ffffff00;
|
||||||
|
width: max-content;
|
||||||
|
max-width: 90vw;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dot.active {
|
.dot.active {
|
||||||
@@ -1035,8 +1044,9 @@
|
|||||||
/* Custom Overlay Styling */
|
/* Custom Overlay Styling */
|
||||||
.custom-overlay-container {
|
.custom-overlay-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 8vh;
|
top: calc(8vh + var(--overlay-y, 0vh));
|
||||||
left: 4vw;
|
left: calc(4vw + var(--overlay-x, 0vw));
|
||||||
|
transform: scale(var(--overlay-scale, 1));
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1082,9 +1092,9 @@
|
|||||||
|
|
||||||
@media only screen and (max-width: 767px) and (orientation: portrait) {
|
@media only screen and (max-width: 767px) and (orientation: portrait) {
|
||||||
.custom-overlay-container {
|
.custom-overlay-container {
|
||||||
top: 15vh;
|
top: calc(15vh + var(--overlay-y, 0vh));
|
||||||
left: 50%;
|
left: calc(50% + var(--overlay-x, 0vw));
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%) scale(var(--overlay-scale, 1));
|
||||||
width: 90%;
|
width: 90%;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
* Jellyfin Slideshow by M0RPH3US v4.0.1
|
* Jellyfin Slideshow by M0RPH3US v4.0.1
|
||||||
* Modified by CodeDevMLH
|
* Modified by CodeDevMLH
|
||||||
*
|
*
|
||||||
@@ -64,6 +64,9 @@ const CONFIG = {
|
|||||||
customOverlayStyle: "Shadowed",
|
customOverlayStyle: "Shadowed",
|
||||||
customOverlayImageStyle: "None",
|
customOverlayImageStyle: "None",
|
||||||
customOverlayPriority: "Image",
|
customOverlayPriority: "Image",
|
||||||
|
customOverlayPositionX: 0,
|
||||||
|
customOverlayPositionY: 0,
|
||||||
|
customOverlayScale: 100,
|
||||||
enableCustomMediaIds: true,
|
enableCustomMediaIds: true,
|
||||||
enableSeasonalContent: false,
|
enableSeasonalContent: false,
|
||||||
customMediaIds: "",
|
customMediaIds: "",
|
||||||
@@ -337,6 +340,15 @@ const initLoadingScreen = () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Global Failsafe, force remove loading screen after 15 seconds to prevent infinite lockouts
|
||||||
|
setTimeout(() => {
|
||||||
|
const loader = document.querySelector(".bar-loading");
|
||||||
|
if (loader) {
|
||||||
|
console.warn("🎬 Media Bar:", "Loading screen timed out! Forcing removal as a failsafe.");
|
||||||
|
finishLoading();
|
||||||
|
}
|
||||||
|
}, 15000);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2360,8 +2372,17 @@ const SlideshowManager = {
|
|||||||
|
|
||||||
const totalItems = STATE.slideshow.totalItems || 0;
|
const totalItems = STATE.slideshow.totalItems || 0;
|
||||||
|
|
||||||
|
// dynamically lower the max dots threshold on small screens
|
||||||
|
let effectiveMaxDots = CONFIG.maxPaginationDots;
|
||||||
|
if (window.matchMedia("(max-width: 767px) and (orientation: portrait)").matches) {
|
||||||
|
const availableWidth = window.innerWidth * 0.9;
|
||||||
|
const dotWidth = 18; // approximate width per dot
|
||||||
|
const fittingDots = Math.floor(availableWidth / dotWidth) - 1;
|
||||||
|
effectiveMaxDots = Math.min(effectiveMaxDots, fittingDots);
|
||||||
|
}
|
||||||
|
|
||||||
// Switch to counter style if too many items
|
// Switch to counter style if too many items
|
||||||
if (totalItems > CONFIG.maxPaginationDots) {
|
if (totalItems > effectiveMaxDots) {
|
||||||
const counter = document.createElement("span");
|
const counter = document.createElement("span");
|
||||||
counter.className = "slide-counter";
|
counter.className = "slide-counter";
|
||||||
counter.id = "slide-counter";
|
counter.id = "slide-counter";
|
||||||
@@ -3867,6 +3888,14 @@ const slidesInit = async () => {
|
|||||||
|
|
||||||
const slidesContainer = document.getElementById("slides-container");
|
const slidesContainer = document.getElementById("slides-container");
|
||||||
if (slidesContainer) {
|
if (slidesContainer) {
|
||||||
|
const posX = CONFIG.customOverlayPositionX || 0;
|
||||||
|
const posY = CONFIG.customOverlayPositionY || 0;
|
||||||
|
const scaleValue = (CONFIG.customOverlayScale !== undefined ? CONFIG.customOverlayScale : 100) / 100;
|
||||||
|
|
||||||
|
overlayContainer.style.setProperty('--overlay-x', `${posX}vw`);
|
||||||
|
overlayContainer.style.setProperty('--overlay-y', `${posY}vh`);
|
||||||
|
overlayContainer.style.setProperty('--overlay-scale', scaleValue);
|
||||||
|
|
||||||
slidesContainer.appendChild(overlayContainer);
|
slidesContainer.appendChild(overlayContainer);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -3881,8 +3910,16 @@ const slidesInit = async () => {
|
|||||||
homeSections.style.top = '0';
|
homeSections.style.top = '0';
|
||||||
homeSections.style.marginTop = '0';
|
homeSections.style.marginTop = '0';
|
||||||
}
|
}
|
||||||
const container = document.getElementById('slides-container');
|
let container = document.getElementById('slides-container');
|
||||||
if (container) container.style.display = 'none';
|
if (container) {
|
||||||
|
container.style.display = 'none';
|
||||||
|
} else {
|
||||||
|
// Create dummy container so loading screen's interval can trigger its own cleanup
|
||||||
|
container = document.createElement('div');
|
||||||
|
container.id = 'slides-container';
|
||||||
|
container.style.display = 'none';
|
||||||
|
document.body.appendChild(container);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,12 +9,20 @@
|
|||||||
"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.2.6",
|
"version": "1.8.1.2",
|
||||||
|
"changelog": "fix pagination dot issue on mobile when showing more than 10 dots (should now dynamically adjust the max dots threshold based on screen size)",
|
||||||
|
"targetAbi": "10.11.0.0",
|
||||||
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.8.1.2/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
|
"checksum": "5ca1f5b5ad5dd20d521533b815aec656",
|
||||||
|
"timestamp": "2026-03-23T17:35:37Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.8.0.0",
|
||||||
"changelog": "feat: add custom text/image overlay option\n- 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 custom text/image overlay option\n- 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.2.6/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.8.0.0/Jellyfin.Plugin.MediaBarEnhanced.zip",
|
||||||
"checksum": "159c4d42dca78088fb4725af1c4252cc",
|
"checksum": "0aac723796d41fc15987c94ac0476584",
|
||||||
"timestamp": "2026-03-10T22:08:50Z"
|
"timestamp": "2026-03-11T01:38:43Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "1.7.0.14",
|
"version": "1.7.0.14",
|
||||||
|
|||||||
Reference in New Issue
Block a user