Compare commits

..

138 Commits

Author SHA1 Message Date
CodeDevMLH
a5e98bdd93 Update manifest.json for release v1.8.1.6 [skip ci] 2026-03-24 00:04:24 +00:00
CodeDevMLH
ed5c0ab696 Bump version to 1.8.1.6
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-24 01:03:37 +01:00
CodeDevMLH
ffcbd21eb6 Update YouTube iframe source to include autoplay, controls, and mute options 2026-03-24 01:03:24 +01:00
CodeDevMLH
4ddd83ba4d Update manifest.json for release v1.8.1.5 [skip ci] 2026-03-23 23:44:24 +00:00
CodeDevMLH
b08a93718e Bump version to 1.8.1.5
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 47s
2026-03-24 00:43:37 +01:00
CodeDevMLH
eecb81d59a Implement play signal management for slideshow video playback 2026-03-24 00:43:17 +01:00
CodeDevMLH
664eecf779 Enhance video playback logic by introducing a play signal check for active slides 2026-03-24 00:38:04 +01:00
CodeDevMLH
c833a94c3f Update manifest.json for release v1.8.1.4 [skip ci] 2026-03-23 23:18:11 +00:00
CodeDevMLH
b1c39b4b38 Bump version to 1.8.1.4
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-24 00:17:24 +01:00
CodeDevMLH
5e398d06a8 Add backdrop video delay and plot width constraint options; improve autoplay handling 2026-03-24 00:17:05 +01:00
CodeDevMLH
23a73543c9 Update manifest.json for release v1.8.1.3 [skip ci] 2026-03-23 22:47:55 +00:00
CodeDevMLH
8804048c61 Bump version to 1.8.1.3
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-23 23:47:09 +01:00
CodeDevMLH
992f854dd2 Add configuration options for backdrop video delay and plot width constraint 2026-03-23 23:37:47 +01:00
CodeDevMLH
c30300d1ba Update manifest.json for release v1.8.1.2 [skip ci] 2026-03-23 17:35:37 +00:00
CodeDevMLH
387f0dd26f Bump version to 1.8.1.2
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-23 18:34:50 +01:00
CodeDevMLH
71d9cddebb Add failsafe to remove loading screen after 15 seconds to prevent infinite lockouts 2026-03-23 18:34:33 +01:00
CodeDevMLH
9abcdf522d Fix slides container initialization to create a dummy element if not present 2026-03-23 18:26:18 +01:00
CodeDevMLH
8c703ce171 Update manifest.json for release v1.8.1.1 [skip ci] 2026-03-23 16:42:42 +00:00
CodeDevMLH
a40ee4a40d Bump version to 1.8.1.1 and update changelog for mobile pagination fix
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-23 17:41:55 +01:00
CodeDevMLH
d7e9238e21 Add padding to the slides container for improved layout 2026-03-23 17:41:40 +01:00
CodeDevMLH
a296caf70d Update manifest.json for release v1.8.1.0 [skip ci] 2026-03-23 16:28:17 +00:00
CodeDevMLH
86e9968243 bump version 1.8.1.0
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 55s
2026-03-23 17:27:08 +01:00
CodeDevMLH
e9fe356cee Enhance slideshow responsiveness by adjusting dot display for small screens 2026-03-23 17:25:48 +01:00
CodeDevMLH
e25a99439a Update manifest.json for release v1.8.0.0 [skip ci] 2026-03-11 01:38:44 +00:00
CodeDevMLH
ba2ad8f2cc Bump version to 1.8.0.0 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-11 02:37:57 +01:00
CodeDevMLH
5274e61204 Update manifest.json for release v1.7.2.16 [skip ci] 2026-03-11 00:46:03 +00:00
CodeDevMLH
93919c08ef Bump version to 1.7.2.16 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-11 01:45:14 +01:00
CodeDevMLH
c80de82a76 Refactor clear image button styling in configPage.html for improved usability 2026-03-11 01:44:59 +01:00
CodeDevMLH
c541e1e543 Update manifest.json for release v1.7.2.15 [skip ci] 2026-03-11 00:31:08 +00:00
CodeDevMLH
2c7dae4d6d Bump version to 1.7.2.15 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 47s
2026-03-11 01:30:19 +01:00
CodeDevMLH
3869a089a1 Improve styling for clear image button in configPage.html 2026-03-11 01:30:06 +01:00
CodeDevMLH
014c908a1e Update manifest.json for release v1.7.2.14 [skip ci] 2026-03-11 00:20:42 +00:00
CodeDevMLH
f6cecf6a9e Bump version to 1.7.2.14 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-11 01:19:56 +01:00
CodeDevMLH
81e4643652 Improve styling for clear image buttons in configPage.html 2026-03-11 01:19:43 +01:00
CodeDevMLH
1b65843b20 Update manifest.json for release v1.7.2.13 [skip ci] 2026-03-11 00:13:26 +00:00
CodeDevMLH
a70690c0de Bump version to 1.7.2.13 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-11 01:12:40 +01:00
CodeDevMLH
1e21286a66 Refactor seasonal image clear button styling in configPage.html 2026-03-11 01:12:28 +01:00
CodeDevMLH
90a64d49ed Update manifest.json for release v1.7.2.12 [skip ci] 2026-03-11 00:05:56 +00:00
CodeDevMLH
009798ea06 Bump version to 1.7.2.12 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 51s
2026-03-11 01:05:03 +01:00
CodeDevMLH
53f0f3c401 Refactor seasonal image clear button visibility and styling in configPage.html 2026-03-11 01:04:50 +01:00
CodeDevMLH
81dad8c6c6 Update manifest.json for release v1.7.2.11 [skip ci] 2026-03-10 23:58:38 +00:00
CodeDevMLH
66fe4dc3cb Bump version to 1.7.2.11 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 52s
2026-03-11 00:57:45 +01:00
CodeDevMLH
7be968d1c6 test 2026-03-11 00:57:31 +01:00
CodeDevMLH
2d492f3fed Update manifest.json for release v1.7.2.10 [skip ci] 2026-03-10 23:50:23 +00:00
CodeDevMLH
2160e2963c Bump version to 1.7.2.10 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-11 00:49:37 +01:00
CodeDevMLH
dc64bbe345 Improve styling and positioning of the clear image button in configPage.html 2026-03-11 00:49:25 +01:00
CodeDevMLH
3a61b3e548 Update manifest.json for release v1.7.2.9 [skip ci] 2026-03-10 23:38:07 +00:00
CodeDevMLH
950116a775 Bump version to 1.7.2.9 in project files and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-11 00:37:17 +01:00
CodeDevMLH
b9040c20fc Update field description and adjust seasonal dropzone height in configPage.html 2026-03-11 00:37:02 +01:00
CodeDevMLH
8388463880 delete example configPage 2026-03-11 00:36:58 +01:00
CodeDevMLH
233e569c94 Update field description for image upload in configPage.html 2026-03-11 00:27:32 +01:00
CodeDevMLH
93c265ffed Add authorization to overlay image upload, retrieval, and deletion endpoints 2026-03-11 00:27:26 +01:00
CodeDevMLH
8f4dfa31c8 Remove fallback logic for resource stream retrieval in MediaBarEnhancedController 2026-03-11 00:27:21 +01:00
CodeDevMLH
99b8ef316c Update manifest.json for release v1.7.2.8 [skip ci] 2026-03-10 23:05:14 +00:00
CodeDevMLH
6880ccc9eb Bump version to 1.7.2.8 in project files and manifest.json
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-11 00:04:28 +01:00
CodeDevMLH
f77c3fbf71 Add custom overlay positioning and scaling options to configuration 2026-03-11 00:04:15 +01:00
CodeDevMLH
81b28952cc Update manifest.json for release v1.7.2.7 [skip ci] 2026-03-10 22:49:35 +00:00
CodeDevMLH
911c96216a Bump version to 1.7.2.7 in project files and manifest.json
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 55s
2026-03-10 23:48:40 +01:00
CodeDevMLH
b3b6296798 Add custom overlay positioning and scaling options in configuration 2026-03-10 23:43:20 +01:00
CodeDevMLH
bca2d577b9 Update manifest.json for release v1.7.2.6 [skip ci] 2026-03-10 22:08:51 +00:00
CodeDevMLH
11b6316338 Bump version to 1.7.2.6 in project files and manifest.json
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-10 23:08:07 +01:00
CodeDevMLH
bbc6da9d41 Add new visual styles and effects for custom overlays in configuration 2026-03-10 23:07:54 +01:00
CodeDevMLH
c313cbf37d Update image directory path in OverlayImageController for asset organization 2026-03-10 23:07:49 +01:00
CodeDevMLH
79405c6e95 Update manifest.json for release v1.7.2.5 [skip ci] 2026-03-10 19:47:07 +00:00
CodeDevMLH
a542e38dc3 Bump version to 1.7.2.5 in project files and manifest.json
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 1m6s
2026-03-10 20:44:51 +01:00
CodeDevMLH
a27566632c Update image directory path in OverlayImageController 2026-03-10 20:44:31 +01:00
CodeDevMLH
779e20bfb2 Update manifest.json for release v1.7.2.4 [skip ci] 2026-03-10 00:28:44 +00:00
CodeDevMLH
0624624190 Bump version to 1.7.2.4 in project files and manifest.json
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-10 01:27:57 +01:00
CodeDevMLH
dd07c452ca Enhance image upload handling and update UI elements for clarity 2026-03-10 01:27:46 +01:00
CodeDevMLH
0cd64d4eea Update manifest.json for release v1.7.2.3 [skip ci] 2026-03-10 00:06:07 +00:00
CodeDevMLH
3480131e3c bum to 1.7.2.3
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-10 01:02:54 +01:00
CodeDevMLH
f33c5be75f Refactor code structure for improved readability and maintainability 2026-03-10 01:02:52 +01:00
CodeDevMLH
c1d06f3bb8 Add global overlay text and image configuration options; enhance upload functionality 2026-03-10 00:02:07 +01:00
CodeDevMLH
c493212f65 Update manifest.json for release v1.7.2.2 [skip ci] 2026-03-09 22:29:30 +00:00
CodeDevMLH
d497f22416 Bump version to 1.7.2.2 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-09 23:27:59 +01:00
CodeDevMLH
f65475673d Add custom overlay image style and priority options; enhance overlay handling 2026-03-09 23:27:28 +01:00
CodeDevMLH
0a8ba042db Update manifest.json for release v1.7.2.1 [skip ci] 2026-03-09 14:26:43 +00:00
CodeDevMLH
f9b8722259 Bump version to 1.7.2.1 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-09 15:25:58 +01:00
CodeDevMLH
66f6f7b434 Enhance overlay image handling: support dynamic filenames, add delete and rename functionality, and improve seasonal image management 2026-03-09 15:25:49 +01:00
CodeDevMLH
22c873d686 Update manifest.json for release v1.7.2.0 [skip ci] 2026-03-09 03:12:09 +00:00
CodeDevMLH
c3a73cc28b Bump version to 1.7.2.0 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 43s
2026-03-09 04:11:23 +01:00
CodeDevMLH
fc3a5f1e66 Add button for custom overlay settings in configuration page 2026-03-09 04:10:56 +01:00
CodeDevMLH
cd490cf0f3 Update manifest.json for release v1.7.1.15 [skip ci] 2026-03-09 03:03:01 +00:00
CodeDevMLH
bb6310381a Refactor overlay image handling and improve safety checks for plugin configuration
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 43s
2026-03-09 04:02:17 +01:00
CodeDevMLH
518fd5640e Bump version to 1.7.1.15 and update changelog for new features and fixes
Some checks failed
Auto Release Plugin / build-and-release (push) Failing after 51s
2026-03-09 03:40:38 +01:00
CodeDevMLH
a57f3db009 Add custom overlay image upload feature with style options 2026-03-09 03:40:13 +01:00
CodeDevMLH
8ff4f081f3 Update manifest.json for release v1.7.1.14 [skip ci] 2026-03-09 01:29:55 +00:00
CodeDevMLH
4a07c22091 Bump version to 1.7.1.14 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 43s
2026-03-09 02:29:11 +01:00
CodeDevMLH
4d1d442746 Add custom overlay feature with configuration options for text and image 2026-03-09 02:28:46 +01:00
CodeDevMLH
1df2b341e5 Refactor mask-image properties for improved readability in mediaBarEnhanced.css 2026-03-09 01:57:21 +01:00
CodeDevMLH
b2dbd6df45 Update manifest.json for release v1.7.1.13 [skip ci] 2026-03-08 22:50:48 +00:00
CodeDevMLH
60c72a01b1 Bump version to 1.7.1.13 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-08 23:50:03 +01:00
CodeDevMLH
9f7ef3c96b Refactor button background colors for improved visibility and update YouTube iframe attributes for better playback control 2026-03-08 23:49:49 +01:00
CodeDevMLH
7ffcfa68c1 Update manifest.json for release v1.7.1.12 [skip ci] 2026-03-08 22:15:28 +00:00
CodeDevMLH
aaf21d3c33 Bump version to 1.7.1.12 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-08 23:14:42 +01:00
CodeDevMLH
9758ecd417 Add background color to detail and favorite buttons for improved visibility 2026-03-08 23:14:09 +01:00
CodeDevMLH
a4547d80b1 Update manifest.json for release v1.7.1.11 [skip ci] 2026-03-08 22:06:37 +00:00
CodeDevMLH
671e38ff32 Bump version to 1.7.1.11 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-08 23:05:51 +01:00
CodeDevMLH
0e9d0f9d09 Remove appearance properties from button styles and add background color and text color to button for improved visibility 2026-03-08 23:05:38 +01:00
CodeDevMLH
5f296f3c88 Update manifest.json for release v1.7.1.10 [skip ci] 2026-03-08 21:36:22 +00:00
CodeDevMLH
a14b3ca8b5 Bump version to 1.7.1.10 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 45s
2026-03-08 22:35:35 +01:00
CodeDevMLH
4d12e34d01 Enhance CSS styles for buttons and overlays, improving appearance and consistency 2026-03-08 22:35:31 +01:00
CodeDevMLH
59fe6f7083 Update manifest.json for release v1.7.1.9 [skip ci] 2026-03-08 20:58:25 +00:00
CodeDevMLH
dcb2164ea1 Bump version to 1.7.1.9
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 44s
2026-03-08 21:57:41 +01:00
CodeDevMLH
2f71f7b46b Improve null checks and conditionals for better stability in localization and slideshow management
Some checks failed
Auto Release Plugin / build-and-release (push) Has been cancelled
2026-03-08 21:57:22 +01:00
CodeDevMLH
70b0a2a192 Update manifest.json for release v1.7.1.8 [skip ci] 2026-03-08 19:29:25 +00:00
CodeDevMLH
300c76890b Bump version to 1.7.1.8 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-08 20:28:38 +01:00
CodeDevMLH
64e5441aff Optimize slideshow distance calculation for circular navigation 2026-03-08 20:28:20 +01:00
CodeDevMLH
f47c9dde88 Update manifest.json for release v1.7.1.7 [skip ci] 2026-03-08 19:15:10 +00:00
CodeDevMLH
9d42b5af8d Merge branch 'main' of ssh://git.mahom03-spacecloud.de:44322/CodeDevMLH/jellyfin-plugin-media-bar-enhanced
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-08 20:14:23 +01:00
CodeDevMLH
8c5f66716f Update version to 1.7.1.7 and enhance changelog with new features and fixes 2026-03-08 20:09:58 +01:00
CodeDevMLH
41e6c1032d Add Hide Arrows on Mobile option to configuration and update related logic 2026-03-08 20:09:47 +01:00
CodeDevMLH
fe07fe9f5e Update manifest.json for release v1.7.1.6 [skip ci] 2026-03-08 18:33:15 +00:00
CodeDevMLH
22a7eb8dcb Update version to 1.7.1.6 and enhance changelog with new features and fixes
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 46s
2026-03-08 19:32:27 +01:00
CodeDevMLH
07658f4fbc Add Exclude Seasonal Content option to configuration and update related logic 2026-03-08 19:32:15 +01:00
CodeDevMLH
25ee5b73b4 Update field descriptions for Max Parental Rating and Max Days Recent inputs to clarify no limit options 2026-03-08 19:21:04 +01:00
CodeDevMLH
8f8e251054 Add max parental rating and max days recent filters to configuration 2026-03-08 19:19:20 +01:00
CodeDevMLH
05529e5627 add new tests 2026-03-08 19:18:30 +01:00
CodeDevMLH
b3e00e8ad6 Update manifest.json for release v1.7.1.5 [skip ci] 2026-03-08 16:17:52 +00:00
CodeDevMLH
39649a6dd3 Bump version to 1.7.1.5 in project file and manifest
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 49s
2026-03-08 17:17:04 +01:00
CodeDevMLH
11aca32158 Enhance mobile layout by adjusting button container and adding styles for misc-info and genre 2026-03-08 17:17:00 +01:00
CodeDevMLH
9bcb2f984a Update manifest.json for release v1.7.1.4 [skip ci] 2026-03-08 15:58:12 +00:00
CodeDevMLH
c23a614f9f Bump version to 1.7.1.4 and update changelog for new features and fixes
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-03-08 16:57:21 +01:00
CodeDevMLH
3a367cb2be Add ShowPaginationDots configuration option and update related UI elements 2026-03-08 16:57:16 +01:00
CodeDevMLH
2993bfe3f2 del old tmp 2026-03-08 16:56:18 +01:00
CodeDevMLH
3ffa2c262a Update manifest.json for release v1.7.1.3 [skip ci] 2026-03-08 15:20:14 +00:00
CodeDevMLH
dc88110e9c Bump version to 1.7.1.3 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 56s
2026-03-08 16:19:17 +01:00
CodeDevMLH
f9ae62a459 Refactor button-container styles for improved layout and responsiveness 2026-03-08 16:19:07 +01:00
CodeDevMLH
9e2f861213 Update manifest.json for release v1.7.1.2 [skip ci] 2026-03-08 15:08:30 +00:00
CodeDevMLH
4781618a52 Bump version to 1.7.1.2 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-03-08 16:07:39 +01:00
CodeDevMLH
2bed81c1f8 Refactor button-container styles for improved layout and responsiveness 2026-03-08 16:07:32 +01:00
CodeDevMLH
292fcfc389 Update manifest.json for release v1.7.1.1 [skip ci] 2026-03-08 14:48:17 +00:00
CodeDevMLH
da718a0e57 Bump version to 1.7.1.1 in project file and manifest for release
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 49s
2026-03-08 15:47:26 +01:00
CodeDevMLH
95a8907496 test2 2026-03-08 15:47:09 +01:00
CodeDevMLH
0498756529 Update manifest.json for release v1.7.1.0 [skip ci] 2026-03-08 14:32:40 +00:00
CodeDevMLH
f1d92080b2 Bump version to 1.7.1.0 and update changelog for mobile button fix
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 48s
2026-03-08 15:31:52 +01:00
CodeDevMLH
586b57d23e Enhance button layout in button-container for better responsiveness 2026-03-08 15:30:21 +01:00
CodeDevMLH
47b05a82ba Update changelog for version 1.7.0.14: enhance iframe security, fix playback issues on iOS/MacOS, disable animations for TV layout, remove list.txt functionality, and improve logging. [skip ci] 2026-03-06 04:30:04 +01:00
16 changed files with 1942 additions and 3904 deletions

View File

@@ -44,18 +44,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Api
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)
{
return NotFound($"Resource not found: {resourceName}");

View File

@@ -0,0 +1,182 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MediaBrowser.Common.Configuration;
using Microsoft.AspNetCore.Authorization;
namespace Jellyfin.Plugin.MediaBarEnhanced.Api
{
/// <summary>
/// Controller for handling custom overlay image uploads and retrieval.
/// </summary>
[ApiController]
[Route("MediaBarEnhanced")]
public class OverlayImageController : ControllerBase
{
private readonly IApplicationPaths _applicationPaths;
private readonly string _imageDirectory;
public OverlayImageController(IApplicationPaths applicationPaths)
{
_applicationPaths = applicationPaths;
_imageDirectory = Path.Combine(applicationPaths.PluginConfigurationsPath, "Jellyfin.Plugin.MediaBarEnhanced", "Assets");
}
/// <summary>
/// Uploads a new custom overlay image.
/// </summary>
[Authorize(Policy = "RequiresElevation")]
[HttpPost("OverlayImage")]
[Consumes("multipart/form-data")]
public async Task<IActionResult> UploadImage([FromForm] IFormFile file, [FromQuery] string? filename = null)
{
if (file == null || file.Length == 0)
{
return BadRequest("No file uploaded.");
}
// Extract original extension or fallback to .jpg
string extension = Path.GetExtension(file.FileName);
if (string.IsNullOrWhiteSpace(extension)) extension = ".jpg";
// 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}";
try
{
if (!Directory.Exists(_imageDirectory))
{
Directory.CreateDirectory(_imageDirectory);
}
// Remove existing
var existingFiles = Directory.GetFiles(_imageDirectory, $"{prefix}.*");
foreach(var extFile in existingFiles)
{
System.IO.File.Delete(extFile);
}
string targetFileName = $"{prefix}{extension}";
string targetPath = Path.Combine(_imageDirectory, targetFileName);
using (var stream = new FileStream(targetPath, FileMode.Create, FileAccess.Write, FileShare.None))
{
await file.CopyToAsync(stream).ConfigureAwait(false);
}
// Return the GET URL that the frontend can use
var qs = string.IsNullOrWhiteSpace(filename) ? "" : $"?filename={Uri.EscapeDataString(filename)}&";
var getUrl = $"/MediaBarEnhanced/OverlayImage{qs}{(qs == "" ? "?" : "")}t={DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}";
return Ok(new { url = getUrl });
}
catch (Exception ex)
{
return StatusCode(500, $"Internal server error: {ex.Message}");
}
}
/// <summary>
/// Retrieves the custom overlay image.
/// </summary>
[HttpGet("OverlayImage")]
public IActionResult GetImage([FromQuery] string? filename = null)
{
string prefix = string.IsNullOrWhiteSpace(filename) ? "custom_overlay_image_global" : $"custom_overlay_image_{filename}";
if (!Directory.Exists(_imageDirectory))
return NotFound();
var existingFiles = Directory.GetFiles(_imageDirectory, $"{prefix}.*");
if (existingFiles.Length == 0)
return NotFound();
string targetPath = existingFiles[0];
// Read the file and return with appropriate MIME type
var stream = new FileStream(targetPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
string mimeType = "application/octet-stream";
string ext = Path.GetExtension(targetPath).ToLowerInvariant();
switch (ext) {
case ".jpg": case ".jpeg": mimeType = "image/jpeg"; break;
case ".png": mimeType = "image/png"; break;
case ".gif": mimeType = "image/gif"; break;
case ".webp": mimeType = "image/webp"; break;
}
return File(stream, mimeType);
}
/// <summary>
/// Deletes a custom overlay image.
/// </summary>
[Authorize(Policy = "RequiresElevation")]
[HttpDelete("OverlayImage")]
public IActionResult DeleteImage([FromQuery] string? filename = null)
{
string prefix = string.IsNullOrWhiteSpace(filename) ? "custom_overlay_image_global" : $"custom_overlay_image_{filename}";
if (Directory.Exists(_imageDirectory))
{
var existingFiles = Directory.GetFiles(_imageDirectory, $"{prefix}.*");
foreach(var file in existingFiles)
{
try
{
System.IO.File.Delete(file);
}
catch (Exception ex)
{
return StatusCode(500, $"Error deleting file: {ex.Message}");
}
}
return Ok();
}
return NotFound();
}
/// <summary>
/// Renames a custom overlay image (used when a seasonal section is renamed).
/// </summary>
[HttpPut("OverlayImage/Rename")]
public IActionResult RenameImage([FromQuery] string oldName, [FromQuery] string newName)
{
if (string.IsNullOrWhiteSpace(oldName) || string.IsNullOrWhiteSpace(newName))
{
return BadRequest("Both oldName and newName must be provided.");
}
if (!Directory.Exists(_imageDirectory))
return Ok();
var oldFiles = Directory.GetFiles(_imageDirectory, $"custom_overlay_image_{oldName}.*");
if (oldFiles.Length == 0)
return Ok();
try
{
string oldPath = oldFiles[0];
string extension = Path.GetExtension(oldPath);
string newPath = Path.Combine(_imageDirectory, $"custom_overlay_image_{newName}{extension}");
// If a file with the new name already exists, delete it first to avoid conflicts
var existingNewFiles = Directory.GetFiles(_imageDirectory, $"custom_overlay_image_{newName}.*");
foreach(var existing in existingNewFiles) {
System.IO.File.Delete(existing);
}
System.IO.File.Move(oldPath, newPath);
var qs = $"?filename={Uri.EscapeDataString(newName)}&";
var getUrl = $"/MediaBarEnhanced/OverlayImage{qs}t={DateTimeOffset.UtcNow.ToUnixTimeMilliseconds()}";
return Ok(new { url = getUrl });
}
catch (Exception ex)
{
return StatusCode(500, $"Error renaming file: {ex.Message}");
}
}
}
}

View File

@@ -15,9 +15,12 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
public int MaxMovies { get; set; } = 15;
public int MaxTvShows { get; set; } = 15;
public int MaxItems { get; set; } = 500;
public int MaxParentalRating { get; set; } = 0;
public int MaxDaysRecent { get; set; } = 0;
public int PreloadCount { get; set; } = 3;
public int FadeTransitionDuration { get; set; } = 500;
public int MaxPaginationDots { get; set; } = 15;
public bool ShowPaginationDots { get; set; } = true;
public bool SlideAnimationEnabled { get; set; } = true;
public bool EnableVideoBackdrop { get; set; } = true;
public bool UseSponsorBlock { get; set; } = true;
@@ -33,10 +36,12 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
public bool EnableLoadingScreen { get; set; } = true;
public bool EnableKeyboardControls { get; set; } = true;
public bool AlwaysShowArrows { get; set; } = false;
public bool HideArrowsOnMobile { get; set; } = true;
public string CustomMediaIds { get; set; } = "";
public bool EnableCustomMediaIds { get; set; } = true;
public string PreferredVideoQuality { get; set; } = "Auto";
public bool EnableSeasonalContent { get; set; } = false;
public bool ExcludeSeasonalContent { get; set; } = true;
public string SeasonalSections { get; set; } = "[]";
public bool IsEnabled { get; set; } = true;
public bool EnableClientSideSettings { get; set; } = false;
@@ -44,5 +49,18 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Configuration
public bool IncludeWatchedContent { get; set; } = false;
public string SortBy { get; set; } = "Random";
public string SortOrder { get; set; } = "Ascending";
public int BackdropVideoDelay { get; set; } = 0;
public bool ConstrainPlotWidth { get; set; } = false;
public bool EnableCustomOverlay { get; set; } = false;
public string CustomOverlayText { get; set; } = "";
public string CustomOverlayImageUrl { get; set; } = "";
public string CustomOverlayStyle { get; set; } = "Shadowed";
public string CustomOverlayImageStyle { get; set; } = "None";
public string CustomOverlayPriority { get; set; } = "Image";
public int CustomOverlayPositionX { get; set; } = 0;
public int CustomOverlayPositionY { get; set; } = 0;
public int CustomOverlayScale { get; set; } = 100;
}
}

View File

@@ -18,7 +18,7 @@ namespace Jellyfin.Plugin.MediaBarEnhanced.Helpers
try
{
// Safety Check: If plugin is disabled, do nothing
if (!MediaBarEnhancedPlugin.Instance.Configuration.IsEnabled)
if (MediaBarEnhancedPlugin.Instance?.Configuration?.IsEnabled != true)
{
return originalContents;
}

View File

@@ -12,7 +12,7 @@
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
<Title>Jellyfin Media Bar Enhanced Plugin</Title>
<Authors>CodeDevMLH</Authors>
<Version>1.7.0.14</Version>
<Version>1.8.1.6</Version>
<RepositoryUrl>https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced</RepositoryUrl>
</PropertyGroup>

View File

@@ -17,7 +17,6 @@ namespace Jellyfin.Plugin.MediaBarEnhanced
{
private readonly ScriptInjector _scriptInjector;
private readonly ILoggerFactory _loggerFactory;
public IServiceProvider ServiceProvider { get; }
/// <summary>
/// Initializes a new instance of the <see cref="MediaBarEnhancedPlugin"/> class.

View File

@@ -354,13 +354,13 @@
width: 100%;
height: 100%;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(0 0 0 / 0.5) 6%,
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 6%,
#000000 8%);
-webkit-mask-image: linear-gradient(to top,
#fff0 2%,
rgb(0 0 0 / 0.5) 6%,
#000000 8%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 6%,
#000000 8%);
}
.backdrop-container.full-width-video {
@@ -384,13 +384,13 @@
border-radius: 5px;
z-index: 3;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(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,
#fff0 2%,
rgb(0 0 0 / 0.5) 6%,
#000000 8%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 6%,
#000000 8%);
}
.backdrop-overlay {
@@ -403,13 +403,13 @@
border-radius: 5px;
z-index: 4;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(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,
#fff0 2%,
rgb(0 0 0 / 0.5) 4%,
#000000 6%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 4%,
#000000 6%);
}
.gradient-overlay {
@@ -424,13 +424,13 @@
rgba(29, 29, 29, 0) 100%);
z-index: 4;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(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,
#fff0 2%,
rgb(0 0 0 / 0.5) 4%,
#000000 6%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 4%,
#000000 6%);
}
.gradient-overlay.full-width-video {
@@ -489,6 +489,15 @@
overflow: hidden;
}
.plot-container.constrained-plot {
width: 40%;
}
.plot-container.constrained-plot .plot {
line-clamp: 3;
-webkit-line-clamp: 3;
}
.genre {
display: flex;
gap: 5px;
@@ -525,6 +534,8 @@
font-family: "Archivo Narrow", sans-serif;
font-size: 18px;
white-space: nowrap;
background-color: rgb(255, 255, 255);
color: rgb(0, 0, 0);
cursor: pointer;
transition: all 0.3s ease;
font-weight: 700;
@@ -535,6 +546,7 @@
.detail-button {
font-size: 18px;
background-color: rgb(255, 255, 255);
color: rgb(0, 0, 0);
border-radius: 50%;
height: 50px;
@@ -547,6 +559,7 @@
.favorite-button {
font-size: 18px;
background-color: rgb(255, 255, 255);
color: red;
border-radius: 50%;
height: 50px;
@@ -662,7 +675,7 @@
display: flex;
align-items: center;
border-radius: 5px;
background: rgb(255 255 255 / 0.8);
background: rgba(255, 255, 255, 0.8);
color: #000;
border: none;
font-weight: 600;
@@ -712,13 +725,13 @@
object-position: center 20%;
z-index: 3;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(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,
#fff0 2%,
rgb(0 0 0 / 0.5) 6%,
#000000 8%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 6%,
#000000 8%);
}
.gradient-overlay {
@@ -727,17 +740,17 @@
left: 0;
width: 100%;
height: 100%;
background: rgb(0 0 0 / 0.25);
background: rgba(0, 0, 0, 0.25);
z-index: 4;
pointer-events: none;
mask-image: linear-gradient(to top,
#fff0 2%,
rgb(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,
#fff0 2%,
rgb(0 0 0 / 0.5) 6%,
#000000 8%);
rgba(255, 255, 255, 0) 2%,
rgba(0, 0, 0, 0.5) 6%,
#000000 8%);
}
.dots-container {
@@ -745,6 +758,15 @@
left: 50%;
transform: translateX(-50%) scale(0.8);
background-color: #ffffff00;
width: max-content;
max-width: 90vw;
flex-wrap: nowrap;
overflow: hidden;
padding: 10px 0;
}
.dot {
flex-shrink: 0;
}
.dot.active {
@@ -768,7 +790,22 @@
.button-container {
top: calc(50% + 25vh);
left: 50%;
transform: translateX(-50%) scale(0.95);
transform: translateX(-50%);
width: max-content;
max-width: 98vw;
flex-wrap: nowrap;
justify-content: center;
gap: 15px;
}
.button-container button {
margin: 0 !important;
min-width: 0 !important;
}
.button-container .detail-button,
.button-container .favorite-button {
flex-shrink: 0;
}
.logo {
@@ -825,10 +862,6 @@
.genre {
top: calc(50% + 16vh);
}
.button-container {
top: calc(50% + 27vh);
}
}
}
@@ -997,7 +1030,7 @@
margin: 0;
}
.layout-tv .backdrop-container{
.layout-tv .backdrop-container {
top: -5%;
}
@@ -1005,14 +1038,437 @@
.layout-tv .backdrop.animate {
animation: none !important;
}
.layout-tv .logo.animate {
animation: none !important;
}
.layout-tv .slide-counter,
.layout-tv .dots-container {
backdrop-filter: none;
-webkit-backdrop-filter: none;
}
}
/* Custom Overlay Styling */
.custom-overlay-container {
position: absolute;
top: calc(8vh + var(--overlay-y, 0vh));
left: calc(4vw + var(--overlay-x, 0vw));
transform: scale(var(--overlay-scale, 1));
z-index: 15;
display: flex;
align-items: center;
justify-content: flex-start;
pointer-events: none;
animation: overlayFadeInGlobal 1.5s ease-in-out forwards;
/* animation: fadeInOverlay 1.5s ease-in-out forwards; */
}
@keyframes overlayFadeInGlobal {
from { opacity: 0; }
to { opacity: 1; }
}
/* @keyframes fadeInOverlay {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
} */
.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));
}
@media only screen and (max-width: 767px) and (orientation: portrait) {
.custom-overlay-container {
top: calc(15vh + var(--overlay-y, 0vh));
left: calc(50% + var(--overlay-x, 0vw));
transform: translateX(-50%) scale(var(--overlay-scale, 1));
width: 90%;
justify-content: center;
text-align: center;
}
.custom-overlay-text {
font-size: 1.5rem; /* 1.5 - 1.8 */
}
/* @keyframes fadeInOverlay {
from {
opacity: 0;
transform: translate(-50%, -10px);
}
to {
opacity: 1;
transform: translate(-50%, 0);
}
} */
.custom-overlay-image {
max-width: 150px; /* oder 200px? */
max-height: 60px; /* oder 80px? */
}
}
/* Custom Overlay Text Styles */
.custom-overlay-style-None {
color: #fff;
text-shadow: none;
}
.custom-overlay-style-Shadowed {
color: #fff;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), -1px -1px 4px rgba(0, 0, 0, 0.8);
}
.custom-overlay-style-Frosted {
color: #fff;
background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0));
backdrop-filter: blur(20px) saturate(1.5);
-webkit-backdrop-filter: blur(20px) saturate(1.5);
padding: 10px 30px;
border-radius: 50px;
border: 1px solid rgba(255, 255, 255, 0.3);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-right: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.custom-overlay-style-Cinematic {
background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c, #fcf6ba, #bf953f);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: none;
filter: drop-shadow(0px 2px 8px rgba(255, 215, 0, 0.4)) drop-shadow(2px 2px 4px rgba(0,0,0,0.8));
animation: shineCinematic 6s linear infinite;
background-size: 200% auto;
}
@keyframes shineCinematic {
0% { background-position: 0% center; }
100% { background-position: 200% center; }
}
.custom-overlay-style-Pulse {
color: #fff;
text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), -1px -1px 4px rgba(0, 0, 0, 0.8);
animation: pulseOverlayText 3s ease-in-out infinite alternate;
}
@keyframes pulseOverlayText {
from {
transform: scale(1);
}
to {
transform: scale(1.05);
}
}
.custom-overlay-style-Neon {
color: #fff;
text-shadow:
0 0 5px #fff,
0 0 10px #fff,
0 0 20px #ff00de,
0 0 40px #ff00de,
0 0 80px #ff00de,
0 0 90px #ff00de,
0 0 100px #ff00de,
0 0 150px #ff00de;
animation: flickerNeon 1.5s infinite alternate;
}
@keyframes flickerNeon {
0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
text-shadow:
0 0 5px #fff,
0 0 10px #fff,
0 0 20px #ff00de,
0 0 40px #ff00de,
0 0 80px #ff00de,
0 0 90px #ff00de,
0 0 100px #ff00de,
0 0 150px #ff00de;
}
20%, 24%, 55% {
text-shadow: none;
}
}
.custom-overlay-style-Typewriter {
font-family: 'Courier New', Courier, monospace;
background-color: #222;
color: #00ff00;
padding: 10px 20px;
border: 2px solid #00ff00;
border-radius: 4px;
box-shadow: 4px 4px 0px #00ff00;
text-transform: uppercase;
}
.custom-overlay-style-Bubble {
color: #fff;
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
padding: 12px 30px;
border-radius: 100px;
border: 2px solid rgba(255, 255, 255, 0.5);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 0 20px rgba(255,255,255,0.2);
text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
animation: floatBubble 4s ease-in-out infinite;
}
@keyframes floatBubble {
0% { transform: translateY(0px); }
50% { transform: translateY(-15px); }
100% { transform: translateY(0px); }
}
.custom-overlay-style-SlideIn {
color: #fff;
text-transform: uppercase;
letter-spacing: 5px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
position: relative;
animation: slideInCinematic 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.custom-overlay-style-SlideIn::before {
content: '';
position: absolute;
top: -10px;
bottom: -10px;
left: -50vw;
right: -50px;
background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.6) 40%, transparent 100%);
z-index: -1;
}
@keyframes slideInCinematic {
from {
transform: translateX(-100vw);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
.custom-overlay-style-SteadyNeon {
color: #fff;
text-shadow:
0 0 5px #fff,
0 0 10px #fff,
0 0 20px #ff00de,
0 0 40px #ff00de,
0 0 80px #ff00de;
}
.custom-overlay-style-Glitch {
color: #fff;
position: relative;
text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
animation: glitchText 3s infinite;
}
@keyframes glitchText {
0% { text-shadow: 2px 2px 8px rgba(0,0,0,0.8); transform: translate(0); }
20% { text-shadow: 2px 2px 8px rgba(0,0,0,0.8); transform: translate(0); }
21% { text-shadow: -2px 0 0 #ff00c1, 2px 0 0 #00fff9; transform: translate(-2px, 1px); }
23% { text-shadow: 2px 0 0 #ff00c1, -2px 0 0 #00fff9; transform: translate(2px, -1px); }
25% { text-shadow: 2px 2px 8px rgba(0,0,0,0.8); transform: translate(0); }
100% { text-shadow: 2px 2px 8px rgba(0,0,0,0.8); transform: translate(0); }
}
.custom-overlay-style-RetroPop {
color: #f7f7f7;
text-shadow:
2px 2px 0px #ff0055,
4px 4px 0px #00a4dc,
6px 6px 0px #ffcc00,
8px 8px 10px rgba(0,0,0,0.6);
font-weight: 900;
letter-spacing: 2px;
}
.custom-overlay-style-Shimmer {
color: rgba(255,255,255,0.7);
background: linear-gradient(to right, #222 20%, #fff 40%, #fff 60%, #222 80%);
background-size: 200% auto;
color: #000;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: shimmerText 3s linear infinite;
text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
@keyframes shimmerText {
to {
background-position: 200% center;
}
}
.custom-overlay-style-Wave {
color: #fff;
text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
display: inline-block;
animation: liquidWave 3s ease-in-out infinite;
}
@keyframes liquidWave {
0%, 100% { transform: translateY(0) skewY(0); }
25% { transform: translateY(-3px) skewY(1deg); }
50% { transform: translateY(0) skewY(0); }
75% { transform: translateY(3px) skewY(-1deg); }
}
.custom-overlay-style-VHS {
color: #fff;
text-shadow: 3px 0 0 #f00, -3px 0 0 #0ff;
animation: vhsTracking 2s steps(2, start) infinite;
}
@keyframes vhsTracking {
0%, 100% { text-shadow: 3px 0 0 #f00, -3px 0 0 #0ff; }
50% { text-shadow: 2px 1px 0 #f00, -2px -1px 0 #0ff; }
}
.custom-overlay-style-Matrix {
color: #0f0;
font-family: monospace;
text-shadow: 0 0 5px #0f0, 0 0 10px #0f0;
letter-spacing: 2px;
animation: matrixGlow 2s infinite alternate;
}
@keyframes matrixGlow {
to { text-shadow: 0 0 10px #0f0, 0 0 20px #0f0; }
}
.custom-overlay-style-Ghost {
color: rgba(255,255,255,0.8);
filter: blur(0px);
animation: ghostApparition 6s infinite alternate;
}
@keyframes ghostApparition {
0% { filter: blur(0px); opacity: 1; transform: scale(1); }
50% { filter: blur(3px); opacity: 0.6; transform: scale(1.02); }
100% { filter: blur(8px); opacity: 0; transform: scale(1.05); }
}
.custom-overlay-style-PulseGlow {
color: #fff;
text-shadow: 0 0 10px rgba(255,255,255,0.8);
animation: pulseGlowAura 3s ease-in-out infinite alternate;
}
@keyframes pulseGlowAura {
0% { text-shadow: 0 0 5px rgba(255,255,255,0.5), 0 0 10px #00a4dc; transform: scale(1); }
100% { text-shadow: 0 0 15px rgba(255,255,255,1), 0 0 30px #00a4dc, 0 0 40px #00a4dc; transform: scale(1.05); }
}
/* Custom Overlay Image Styles */
.custom-overlay-img-RoundedShadow {
border-radius: 12px;
filter: drop-shadow(0px 10px 15px rgba(0, 0, 0, 0.6));
}
.custom-overlay-img-GlowingBorder {
border-radius: 8px;
box-shadow: 0 0 10px #00a4dc, 0 0 20px #00a4dc, 0 0 30px #00a4dc, inset 0 0 10px #00a4dc;
animation: pulseGlowImg 2s infinite alternate;
}
@keyframes pulseGlowImg {
from { box-shadow: 0 0 10px #00a4dc, 0 0 20px #00a4dc, 0 0 30px #00a4dc; }
to { box-shadow: 0 0 15px #00a4dc, 0 0 30px #00a4dc, 0 0 45px #00a4dc; }
}
.custom-overlay-img-Polaroid {
background: white;
padding: 10px 10px 25px 10px;
box-shadow: 0 4px 8px rgba(0,0,0,0.4), 0 12px 24px rgba(0,0,0,0.3);
transform: rotate(-3deg);
border-radius: 2px;
}
.custom-overlay-img-Vintage {
filter: sepia(0.6) contrast(1.2) brightness(0.9) saturate(1.2) drop-shadow(2px 4px 8px rgba(0,0,0,0.6));
}
.custom-overlay-img-Grayscale {
filter: grayscale(100%) contrast(1.1) drop-shadow(2px 4px 8px rgba(0,0,0,0.6));
}
.custom-overlay-img-Hologram {
filter: drop-shadow(0 0 10px #0ff) sepia(0.8) hue-rotate(180deg) saturate(3);
opacity: 0.8;
animation: hologramFlicker 3s infinite;
}
@keyframes hologramFlicker {
0% { opacity: 0.8; transform: skewX(0); }
5% { opacity: 0.5; transform: skewX(2deg); }
10% { opacity: 0.9; transform: skewX(-2deg); }
15% { opacity: 0.8; transform: skewX(0); }
100% { opacity: 0.8; }
}
.custom-overlay-img-CRT {
filter: contrast(1.5) brightness(1.2) drop-shadow(3px 0 0 rgba(255,0,0,0.5)) drop-shadow(-3px 0 0 rgba(0,0,255,0.5));
}
.custom-overlay-img-Floating {
filter: drop-shadow(0 15px 20px rgba(0,0,0,0.6));
animation: floatImg 4s ease-in-out infinite;
}
@keyframes floatImg {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-15px); }
}
.custom-overlay-img-VHSTracking {
filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5));
animation: imgVhsTracking 2s infinite;
}
@keyframes imgVhsTracking {
0% { transform: translateX(0); clip-path: inset(0 0 0 0); filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(0deg); }
5% { transform: translateX(-5px); clip-path: inset(10% 0 80% 0); filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(90deg); }
10% { transform: translateX(5px); clip-path: inset(40% 0 40% 0); filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(-90deg); }
15% { transform: translateX(0); clip-path: inset(0 0 0 0); filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(0deg); }
100% { transform: translateX(0); clip-path: inset(0 0 0 0); }
}
.custom-overlay-img-ColorCycle {
filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5));
animation: imgColorCycle 10s linear infinite;
}
@keyframes imgColorCycle {
from { filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(0deg); }
to { filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5)) hue-rotate(360deg); }
}
.custom-overlay-img-Mirror {
filter: drop-shadow(2px 4px 8px rgba(0,0,0,0.5));
-webkit-box-reflect: below 2px linear-gradient(transparent, rgba(255,255,255,0.3));
}

View File

@@ -1,4 +1,4 @@
/*
/*
* Jellyfin Slideshow by M0RPH3US v4.0.1
* Modified by CodeDevMLH
*
@@ -38,6 +38,9 @@ const CONFIG = {
preloadCount: 3,
fadeTransitionDuration: 500,
maxPaginationDots: 15,
showPaginationDots: true,
maxParentalRating: null,
maxDaysRecent: null,
slideAnimationEnabled: true,
enableVideoBackdrop: true,
useSponsorBlock: true,
@@ -54,6 +57,18 @@ const CONFIG = {
preferredVideoQuality: "Auto",
enableKeyboardControls: true,
alwaysShowArrows: false,
hideArrowsOnMobile: true,
enableCustomOverlay: false,
customOverlayText: "",
customOverlayImageUrl: "",
customOverlayStyle: "Shadowed",
customOverlayImageStyle: "None",
customOverlayPriority: "Image",
customOverlayPositionX: 0,
customOverlayPositionY: 0,
customOverlayScale: 100,
backdropVideoDelay: 0,
constrainPlotWidth: false,
enableCustomMediaIds: true,
enableSeasonalContent: false,
customMediaIds: "",
@@ -63,6 +78,7 @@ const CONFIG = {
sortOrder: "Ascending",
applyLimitsToCustomIds: false,
seasonalSections: "[]",
excludeSeasonalContent: true,
isEnabled: true,
};
@@ -96,6 +112,7 @@ const STATE = {
customTrailerUrls: {},
ytPromise: null,
autoplayTimeouts: [],
playSignals: {},
},
};
@@ -326,6 +343,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);
};
/**
@@ -373,6 +399,7 @@ const resetSlideshowState = () => {
STATE.slideshow.customTrailerUrls = {};
STATE.slideshow.totalItems = 0;
STATE.slideshow.isLoading = false;
STATE.slideshow.playSignals = {};
};
/**
@@ -744,7 +771,7 @@ const SlideUtils = {
if (isYoutube && videoId) {
const ytIframe = this.createElement('iframe', {
id: 'modal-yt-player',
src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&origin=${encodeURIComponent(window.location.origin)}`,
src: `https://www.youtube-nocookie.com/embed/${videoId}?autoplay=1&controls=1&iv_load_policy=3&rel=0&playsinline=1`,
allow: 'autoplay; encrypted-media',
style: 'width: 100%; height: 100%; border: none;',
referrerpolicy: 'strict-origin-when-cross-origin',
@@ -754,20 +781,6 @@ const SlideUtils = {
contentContainer.appendChild(ytIframe);
overlay.append(closeButton, contentContainer);
document.body.appendChild(overlay);
this.loadYouTubeIframeAPI().then(() => {
new YT.Player(ytIframe, {
playerVars: {
autoplay: 1,
controls: 1,
iv_load_policy: 3,
rel: 0,
playsinline: 1,
origin: window.location.origin,
enablejsapi: 1
}
});
});
} else {
const video = this.createElement('video', {
src: url,
@@ -775,6 +788,7 @@ const SlideUtils = {
autoplay: true,
className: 'video-modal-player'
});
video.setAttribute('playsinline', '');
contentContainer.appendChild(video);
overlay.append(closeButton, contentContainer);
document.body.appendChild(overlay);
@@ -831,7 +845,7 @@ const LocalizationUtils = {
}
}
if (window.ApiClient && STATE.jellyfinData?.accessToken) {
if (window.ApiClient && STATE.jellyfinData && STATE.jellyfinData.accessToken) {
try {
const userId = window.ApiClient.getCurrentUserId();
if (userId) {
@@ -841,7 +855,7 @@ const LocalizationUtils = {
});
if (userResponse.ok) {
const userData = await userResponse.json();
if (userData.Configuration?.AudioLanguagePreference) {
if (userData.Configuration && userData.Configuration.AudioLanguagePreference) {
locale = userData.Configuration.AudioLanguagePreference.toLowerCase();
}
}
@@ -851,7 +865,7 @@ const LocalizationUtils = {
}
}
if (!locale && window.ApiClient && STATE.jellyfinData?.accessToken) {
if (!locale && window.ApiClient && (STATE.jellyfinData && STATE.jellyfinData.accessToken)) {
try {
const configUrl = window.ApiClient.getUrl('System/Configuration');
const configResponse = await fetch(configUrl, {
@@ -1026,7 +1040,7 @@ const LocalizationUtils = {
*/
getLocalizedString(key, fallback, ...args) {
const locale = this.cachedLocale || 'en-us';
let translated = this.translations[locale]?.[key] || fallback;
let translated = (this.translations[locale] && this.translations[locale][key]) || fallback;
if (args.length > 0) {
for (let i = 0; i < args.length; i++) {
@@ -1110,13 +1124,60 @@ const ApiUtils = {
// Filter by isPlayed=False unless IncludeWatchedContent is enabled
const playedFilter = CONFIG.includeWatchedContent ? '' : '&isPlayed=False';
let parentalFilter = '';
if (CONFIG.maxParentalRating) {
parentalFilter = `&MaxOfficialRating=${CONFIG.maxParentalRating}`;
}
const response = await fetch(
`${STATE.jellyfinData.serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&hasOverview=true&imageTypes=Logo,Backdrop&${sortParams}${playedFilter}&enableUserData=true&Limit=${CONFIG.maxItems}&fields=Id`,
{
headers: this.getAuthHeaders(),
let dateFilter = '';
if (CONFIG.maxDaysRecent) {
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - CONFIG.maxDaysRecent);
dateFilter = `&minDateLastSaved=${pastDate.toISOString()}`;
}
// Exclude seasonal content from random lists
let excludeFilter = '';
if (CONFIG.excludeSeasonalContent && CONFIG.seasonalSections) {
try {
const sections = JSON.parse(CONFIG.seasonalSections || "[]");
let allExcludedIds = [];
for (const section of sections) {
if (section.MediaIds) {
const idsInThisSection = section.MediaIds.split(/[\n,]/)
.map((line) => {
const urlMatch = line.match(/\[(.*?)\]/);
let id = line;
if (urlMatch) {
id = line.replace(/\[.*?\]/, '').trim();
const guidMatch = id.match(/([0-9a-f]{32})/i);
if (guidMatch) { id = guidMatch[1]; } else { id = id.split('|')[0].trim(); }
}
return id.trim();
})
.filter((id) => id);
allExcludedIds.push(...idsInThisSection);
}
}
if (allExcludedIds.length > 0) {
excludeFilter = `&ExcludeItemIds=${allExcludedIds.join(',')}`;
}
} catch(e) {
console.error("🎬 Media Bar:", "Error extracting seasonal IDs for exclusion:", e);
}
);
}
const fetchItems = async (currentDateFilter) => {
const url = `${STATE.jellyfinData.serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&hasOverview=true&imageTypes=Logo,Backdrop&${sortParams}${playedFilter}${parentalFilter}${currentDateFilter}${excludeFilter}&enableUserData=true&Limit=${CONFIG.maxItems}&fields=Id,DateCreated`;
const resp = await fetch(url, { headers: this.getAuthHeaders() });
return resp;
};
let response = await fetchItems(dateFilter);
if (!response.ok) {
console.error("🎬 Media Bar:",
@@ -1125,12 +1186,32 @@ const ApiUtils = {
return [];
}
const data = await response.json();
const items = data.Items || [];
let data = await response.json();
let items = data.Items || [];
console.log("🎬 Media Bar:",
`Successfully fetched ${items.length} random items from server`
);
// Local exact DateCreated filter: minDateLastSaved pulls items that were merely modified recently (e.g. metadata updates)
// explicitly discard them if their actual DateCreated is older than X days
if (CONFIG.maxDaysRecent && dateFilter !== '') {
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - CONFIG.maxDaysRecent);
items = items.filter(item => {
if (!item.DateCreated) return true;
return new Date(item.DateCreated) >= pastDate;
});
}
// Fallback: If we have a date filter but no items are returned, try again without it
if (items.length === 0 && dateFilter !== '') {
console.warn("🎬 Media Bar:", `No items found within the last ${CONFIG.maxDaysRecent} days. Falling back to random fetching.`);
response = await fetchItems('');
if (response.ok) {
data = await response.json();
items = data.Items || [];
}
}
console.log("🎬 Media Bar:", `Successfully fetched ${items.length} random items from server`);
return items.map((item) => item.Id);
} catch (error) {
@@ -1704,9 +1785,12 @@ const SlideCreator = {
}
const isLowPower = isLowPowerDevice();
const isIOSApp = /iPhone|iPad|iPod/i.test(navigator.userAgent);
const limitVideos = isLowPower || isIOSApp;
const itemIndex = STATE.slideshow.itemIds ? STATE.slideshow.itemIds.indexOf(itemId) : -1;
const isActiveSlide = itemIndex !== -1 && itemIndex === STATE.slideshow.currentSlideIndex;
const shouldCreateVideo = !isLowPower || isActiveSlide;
// Limit YouTube iframe bulk creation on low power devices OR iOS (which kills the WebProcess on OOM)
const shouldCreateVideo = !limitVideos || isActiveSlide;
if (isYoutube && videoId && shouldCreateVideo) {
isVideo = true;
@@ -1722,7 +1806,7 @@ const SlideCreator = {
// Create an iframe upfront
const ytPlayerIframe = SlideUtils.createElement("iframe", {
id: `youtube-player-${itemId}`,
src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&origin=${encodeURIComponent(window.location.origin)}`,
src: `https://www.youtube-nocookie.com/embed/${videoId}?enablejsapi=1&autoplay=0&controls=0&playsinline=1&mute=${STATE.slideshow.isMuted ? 1 : 0}&origin=${encodeURIComponent(window.location.origin)}`,
style: "width: 100%; height: 100%; border: none;",
allow: "autoplay; encrypted-media",
referrerpolicy: "strict-origin-when-cross-origin",
@@ -1797,11 +1881,11 @@ const SlideCreator = {
event.target.setPlaybackQuality(quality);
}
// Only play if this is the active slide
// Only play if this is the active slide and the play signal has been issued (delay finished)
const slide = document.querySelector(`.slide[data-item-id="${itemId}"]`);
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') && STATE.slideshow.playSignals[itemId] === true && !document.hidden && (!isVideoPlayerOpen || isVideoPlayerOpen.classList.contains('hide'))) {
event.target.playVideo();
// Check if it actually started playing after a short delay (handling autoplay blocks)
@@ -1874,6 +1958,7 @@ const SlideCreator = {
};
videoAttributes.muted = "";
videoAttributes.playsinline = "";
videoBackdrop = SlideUtils.createElement("video", videoAttributes);
videoBackdrop.volume = 0.4;
@@ -1974,7 +2059,7 @@ const SlideCreator = {
SlideUtils.truncateText(plotElement, CONFIG.maxPlotLength);
const plotContainer = SlideUtils.createElement("div", {
className: "plot-container",
className: "plot-container" + (CONFIG.constrainPlotWidth ? " constrained-plot" : ""),
});
plotContainer.appendChild(plotElement);
@@ -2280,6 +2365,8 @@ const SlideCreator = {
const SlideshowManager = {
createPaginationDots() {
if (!CONFIG.showPaginationDots) return;
let dotsContainer = document.querySelector(".dots-container");
if (!dotsContainer) {
dotsContainer = document.createElement("div");
@@ -2289,8 +2376,17 @@ const SlideshowManager = {
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
if (totalItems > CONFIG.maxPaginationDots) {
if (totalItems > effectiveMaxDots) {
const counter = document.createElement("span");
counter.className = "slide-counter";
counter.id = "slide-counter";
@@ -2351,6 +2447,11 @@ const SlideshowManager = {
STATE.slideshow.isTransitioning = true;
if (STATE.slideshow.backdropVideoTimeout) {
clearTimeout(STATE.slideshow.backdropVideoTimeout);
STATE.slideshow.backdropVideoTimeout = null;
}
let previousVisibleSlide;
try {
const container = SlideUtils.getOrCreateSlidesContainer();
@@ -2380,7 +2481,9 @@ const SlideshowManager = {
previousVisibleSlide.classList.remove("active");
}
void currentSlide.offsetWidth;
currentSlide.classList.add("active");
STATE.slideshow.playSignals[currentItemId] = false;
// Manage Video Playback: Stop others, Play current
// 1. Stop all other YouTube players and local video elements, release connections
@@ -2441,11 +2544,13 @@ const SlideshowManager = {
}
if (videoBackdrop) {
// preload logic
if (videoBackdrop.tagName === 'VIDEO') {
// Restore src from data-src if it was deactivated to release connections
const lazySrc = videoBackdrop.getAttribute('data-src');
if (lazySrc && !videoBackdrop.src) {
videoBackdrop.src = lazySrc;
videoBackdrop.load(); // Force pre-buffering
}
videoBackdrop.currentTime = 0;
@@ -2454,22 +2559,11 @@ const SlideshowManager = {
if (!STATE.slideshow.isMuted) {
videoBackdrop.volume = 0.4;
}
videoBackdrop.play().catch(e => {
// Check if it actually started playing after a short delay (handling autoplay blocks)
setTimeout(() => {
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
console.warn("🎬 Media Bar:", `Autoplay blocked for ${currentItemId}, attempting muted fallback`);
videoBackdrop.muted = true;
videoBackdrop.play().catch(err => console.error("🎬 Media Bar:", "Muted fallback failed", err));
}
}, 1000);
});
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
const player = STATE.slideshow.videoPlayers[currentItemId];
if (player && typeof player.loadVideoById === 'function' && player._videoId) {
// Use loadVideoById to enforce start and end times
player.loadVideoById({
if (player && typeof player.cueVideoById === 'function' && player._videoId) {
// Use cueVideoById to buffer video without auto-playing it
player.cueVideoById({
videoId: player._videoId,
startSeconds: player._startTime || 0,
endSeconds: player._endTime
@@ -2481,25 +2575,60 @@ const SlideshowManager = {
player.unMute();
player.setVolume(40);
}
// Check if playback successfully started, otherwise fallback to muted
setTimeout(() => {
if (!currentSlide.classList.contains('active')) return;
if (player.getPlayerState &&
player.getPlayerState() !== YT.PlayerState.PLAYING &&
player.getPlayerState() !== YT.PlayerState.BUFFERING) {
console.log("🎬 Media Bar:", "YouTube loadVideoById didn't start playback, retrying muted...");
player.mute();
player.playVideo();
}
}, 1000);
} else if (player && typeof player.seekTo === 'function') {
// Fallback if loadVideoById is not available or videoId missing
const startTime = player._startTime || 0;
player.seekTo(startTime);
player.playVideo();
}
}
// play logic
const playVideoLogic = () => {
if (!currentSlide.classList.contains('active')) return;
STATE.slideshow.playSignals[currentItemId] = true;
if (videoBackdrop.tagName === 'VIDEO') {
videoBackdrop.play().catch(e => {
if (!STATE.slideshow.isMuted) {
// Check if it actually started playing after a short delay (handling autoplay blocks)
setTimeout(() => {
if (videoBackdrop.paused && currentSlide.classList.contains('active')) {
console.warn("🎬 Media Bar:", `Autoplay blocked for ${currentItemId}, attempting muted fallback`);
videoBackdrop.muted = true;
videoBackdrop.play().catch(err => console.error("🎬 Media Bar:", "Muted fallback failed", err));
}
}, 1000);
} else {
console.error("🎬 Media Bar:", "Playback failed despite being muted", e);
}
});
} else if (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) {
const player = STATE.slideshow.videoPlayers[currentItemId];
if (player && typeof player.playVideo === 'function') {
player.playVideo();
if (!STATE.slideshow.isMuted) {
// Check if playback successfully started, otherwise fallback to muted
setTimeout(() => {
if (!currentSlide.classList.contains('active')) return;
if (player.getPlayerState &&
player.getPlayerState() !== YT.PlayerState.PLAYING &&
player.getPlayerState() !== YT.PlayerState.BUFFERING) {
console.log("🎬 Media Bar:", "YouTube didn't start playback, retrying muted...");
player.mute();
player.playVideo();
}
}, 1000);
}
}
}
};
if (CONFIG.backdropVideoDelay > 0) {
STATE.slideshow.backdropVideoTimeout = setTimeout(playVideoLogic, CONFIG.backdropVideoDelay);
} else {
playVideoLogic();
}
}
const enableAnimations = MediaBarEnhancedSettingsManager.getSetting('slideAnimations', CONFIG.slideAnimationEnabled);
@@ -2657,9 +2786,9 @@ const SlideshowManager = {
const totalItems = STATE.slideshow.itemIds.length;
let distance = Math.abs(index - currentIndex);
if (totalItems > keepRange * 2) {
distance = Math.min(distance, totalItems - distance);
}
// Always calculate circular distance for slideshow
distance = Math.min(distance, totalItems - distance);
if (distance > keepRange) {
// Destroy video player if exists
@@ -2729,7 +2858,7 @@ const SlideshowManager = {
if (currentItemId) {
const currentSlide = document.querySelector(`.slide[data-item-id="${currentItemId}"]`);
const video = currentSlide?.querySelector('video');
const video = currentSlide ? currentSlide.querySelector('video') : null;
if (video) {
video.muted = STATE.slideshow.isMuted;
@@ -2889,7 +3018,7 @@ const SlideshowManager = {
if (!currentSlide) return;
// YouTube player: just resume, don't reload
const ytPlayer = STATE.slideshow.videoPlayers?.[currentItemId];
const ytPlayer = (STATE.slideshow.videoPlayers && STATE.slideshow.videoPlayers[currentItemId]) ? STATE.slideshow.videoPlayers[currentItemId] : undefined;
if (ytPlayer && typeof ytPlayer.playVideo === 'function') {
if (STATE.slideshow.isMuted) {
if (typeof ytPlayer.mute === 'function') ytPlayer.mute();
@@ -3396,6 +3525,10 @@ const initArrowNavigation = () => {
container.appendChild(muteButton);
const showArrows = () => {
if (CONFIG.hideArrowsOnMobile && window.matchMedia("only screen and (max-width: 768px)").matches) {
return; // disable arrow display on mobile
}
leftArrow.style.display = "block";
rightArrow.style.display = "block";
@@ -3707,6 +3840,102 @@ const slidesInit = async () => {
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;
// Season fully overrides global overlay, even if empty
activeOverlayImage = section.OverlayImageUrl || null;
activeOverlayText = section.OverlayText || null;
}
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";
const overlayPriority = CONFIG.customOverlayPriority || "Image";
const showImage = activeOverlayImage && (overlayPriority === "Image" || !activeOverlayText);
const showText = activeOverlayText && (!showImage);
if (showImage) {
const img = document.createElement("img");
const imgStyle = CONFIG.customOverlayImageStyle || "None";
img.className = `custom-overlay-image custom-overlay-img-${imgStyle}`;
img.src = activeOverlayImage;
overlayContainer.appendChild(img);
} else if (showText) {
const p = document.createElement("p");
p.className = `custom-overlay-text custom-overlay-style-${CONFIG.customOverlayStyle || 'Shadowed'}`;
p.textContent = activeOverlayText;
overlayContainer.appendChild(p);
}
const slidesContainer = document.getElementById("slides-container");
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);
}
};
if (CONFIG.enableClientSideSettings) {
MediaBarEnhancedSettingsManager.init();
const isClientSideEnabled = MediaBarEnhancedSettingsManager.getSetting('enabled', true);
@@ -3717,8 +3946,16 @@ const slidesInit = async () => {
homeSections.style.top = '0';
homeSections.style.marginTop = '0';
}
const container = document.getElementById('slides-container');
if (container) container.style.display = 'none';
let container = document.getElementById('slides-container');
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;
}
@@ -3805,6 +4042,8 @@ const slidesInit = async () => {
initArrowNavigation();
renderCustomOverlay();
await SlideshowManager.loadSlideshowData();
SlideshowManager.initTouchEvents();

View File

@@ -8,9 +8,25 @@
"category": "General",
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
"versions": [
{
"version": "1.8.1.6",
"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)\n- add option to delay trailer playback\n- add option to limit the plot width",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.8.1.6/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "f6b8dfde71b376e73a83d66e13171e9c",
"timestamp": "2026-03-24T00:04:23Z"
},
{
"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",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.8.0.0/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "0aac723796d41fc15987c94ac0476584",
"timestamp": "2026-03-11T01:38:43Z"
},
{
"version": "1.7.0.14",
"changelog": "- Add YouTube no-cookie host and referrer policy for iframe security to fix playback issues on iOS/MacOS",
"changelog": "- Switched to YouTube no-cookie host and referrer policy for iframe security\n- fix playback issues on iOS/MacOS \n- Disable animations and backdrop filters for TV layout\n- removed list.txt functionality to clean up, use the web ui instead\n- Enhance logging with contextual messages, in order to be able to clearly assign logs to this plugin",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.7.0.14/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "07875c74aab766657be3b8033be6d53f",

View File

@@ -0,0 +1,73 @@
(async () => {
const apiClient = window.ApiClient;
if (!apiClient) {
console.error("ApiClient not found. Are you logged in?");
return;
}
const userId = apiClient.getCurrentUserId();
const serverAddress = apiClient.serverAddress();
const maxDaysRecent = 30; // 30 Tage Limit
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - maxDaysRecent);
const dateStr = pastDate.toISOString();
console.log(`\n%c=== TEST: DateCreated Direkt-Abfrage ===`, "color: #00a4dc; font-weight: bold; font-size: 14px;");
console.log(`Wir suchen Filme, die nach dem ${dateStr} hinzugefügt wurden.\n`);
// Wir probieren alle denkbaren Parameter-Schreibweisen aus,
// die Jellyfin historisch oder in Forks für "DateCreated" akzeptieren könnte.
const testCases = [
{ name: "MinDateCreated (PascalCase)", param: `MinDateCreated=${dateStr}` },
{ name: "minDateCreated (camelCase)", param: `minDateCreated=${dateStr}` },
{ name: "DateCreatedMin", param: `DateCreatedMin=${dateStr}` },
{ name: "dateCreatedMin", param: `dateCreatedMin=${dateStr}` },
{ name: "StartDate", param: `StartDate=${dateStr}` },
{ name: "startDate", param: `startDate=${dateStr}` }
];
try {
for (let i = 0; i < testCases.length; i++) {
const test = testCases[i];
const apiUrl = `${serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&enableUserData=true&Limit=5&fields=Id,DateCreated&userId=${userId}&${test.param}`;
console.log(`%cTest ${i+1}: ${test.name}`, "color: yellow;");
console.log(`URL: ${apiUrl}`);
const response = await fetch(apiUrl, {
headers: {
Authorization: `MediaBrowser Client="${apiClient.appName()}", Device="${apiClient.deviceName()}", DeviceId="${apiClient.deviceId()}", Version="${apiClient.appVersion()}", Token="${apiClient.accessToken()}"`
}
});
if (!response.ok) {
console.error(`-> ❌ HTTP Fehler: ${response.status}`);
continue;
}
const data = await response.json();
const items = data.Items || [];
// Zur Auswertung: Wenn die Abfrage ignoriert wird, liefert er oft ALLE (hier max 5) zurück.
// Filtert er wirklich, sollten es WENIGER als 5, und zwar im besten Fall genau die RICHTIGEN sein.
console.log(`-> Ergebnis: ${items.length} Items zurückgeliefert.`);
if (items.length > 0) {
// Wir checken, ob die zurückgelieferten Items WIRKLICH neu sind
const oldItems = items.filter(item => new Date(item.DateCreated) < pastDate);
if (oldItems.length > 0) {
console.log(` ❌ Filter FEHLGESCHLAGEN: Es wurden ${oldItems.length} "alte" Filme zurückgegeben (z.B. ${oldItems[0].Name}). Er ignoriert also den Parameter.`);
} else {
console.log(` ✅ Filter KÖNNTE funktionieren: Alle zurückgegebenen Filme sind neuer als unser Datum! (Erster: ${items[0].Name})`);
}
} else {
console.log(` ❓ Keine Items gefunden (entweder strenger Filter oder gar keine neuen Filme vorhanden).`);
}
console.log("\n");
}
} catch (error) {
console.error("Fehler beim Abruf:", error);
}
})();

View File

@@ -0,0 +1,56 @@
(async () => {
const apiClient = window.ApiClient;
if (!apiClient) {
console.error("ApiClient not found. Are you logged in?");
return;
}
const userId = apiClient.getCurrentUserId();
const serverAddress = apiClient.serverAddress();
const maxDaysRecent = 30; // Test: Added in last 30 days
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - maxDaysRecent);
const dateStr = pastDate.toISOString();
console.log(`Searching for items added after: ${dateStr}`);
const testUrls = [
// Test 1: minDateCreated (CamelCase)
`${serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&enableUserData=true&Limit=5&fields=Id,DateCreated&userId=${userId}&minDateCreated=${dateStr}`,
// Test 2: minDateLastSaved
`${serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&enableUserData=true&Limit=5&fields=Id,DateCreated&userId=${userId}&minDateLastSaved=${dateStr}`,
];
try {
for (let i = 0; i < testUrls.length; i++) {
const apiUrl = testUrls[i];
console.log(`\n%cTest ${i+1}: Testing URL:\n${apiUrl}`, "color: yellow;");
const response = await fetch(apiUrl, {
headers: {
Authorization: `MediaBrowser Client="${apiClient.appName()}", Device="${apiClient.deviceName()}", DeviceId="${apiClient.deviceId()}", Version="${apiClient.appVersion()}", Token="${apiClient.accessToken()}"`
}
});
if (!response.ok) {
console.error(`Failed to fetch items: ${response.status} ${response.statusText}`);
continue;
}
const data = await response.json();
const items = data.Items || [];
console.log(`%cErgebnis: ${items.length} Items gefunden!`, "color: #00a4dc; font-weight: bold;");
if(items.length > 0) {
console.log("Gefundene Items:");
items.forEach(item => {
console.log(`- Name: ${item.Name}, DateCreated: ${item.DateCreated}, Art: ${item.Type}`);
});
}
}
} catch (error) {
console.error("Fehler beim Abrufen der URL:", error);
}
})();

View File

@@ -0,0 +1,72 @@
(async () => {
const apiClient = window.ApiClient;
if (!apiClient) {
console.error("ApiClient not found. Are you logged in?");
return;
}
const userId = apiClient.getCurrentUserId();
const serverAddress = apiClient.serverAddress();
const maxDaysRecent = 30; // Test: Added in last 30 days
// 1. Calculate the cutoff date
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - maxDaysRecent);
const dateStr = pastDate.toISOString();
console.log(`\n%c=== TEST: 2-Stufen "Zuletzt Hinzugefügt" Filter ===`, "color: #00a4dc; font-weight: bold; font-size: 14px;");
console.log(`Suche Items neuer als: ${dateStr} (${maxDaysRecent} Tage alt)\n`);
const apiUrl = `${serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&enableUserData=true&Limit=50&fields=Id,DateCreated&userId=${userId}&minDateLastSaved=${dateStr}`;
try {
console.log(`%cSchritt 1: API Call mit minDateLastSaved...`, "color: yellow;");
console.log(`URL: ${apiUrl}`);
const response = await fetch(apiUrl, {
headers: {
Authorization: `MediaBrowser Client="${apiClient.appName()}", Device="${apiClient.deviceName()}", DeviceId="${apiClient.deviceId()}", Version="${apiClient.appVersion()}", Token="${apiClient.accessToken()}"`
}
});
if (!response.ok) {
throw new Error(`Failed to fetch items: ${response.status} ${response.statusText}`);
}
const data = await response.json();
let items = data.Items || [];
console.log(`-> API lieferte ${items.length} potenziell neue/geänderte Items zurück.\n`);
if (items.length > 0) {
console.log("Die API hielt diese Items für neu/aktuell:");
items.forEach(item => console.log(` - ${item.Name} (DateCreated: ${item.DateCreated})`));
}
console.log(`\n%cSchritt 2: Lokaler DateCreated Filter (Wie das Plugin ihn jetzt nutzt)...`, "color: yellow;");
// Exakt dieser Filter-Block ist jetzt auch so in mediaBarEnhanced.js
const finalItems = items.filter(item => {
if (!item.DateCreated) return true; // Fallback falls Jellyfin kein Datum schickt
const dCreated = new Date(item.DateCreated);
return dCreated >= pastDate;
});
console.log(`%c-> FINALES ERGEBNIS: ${finalItems.length} echte Neuzugänge bleiben übrig!`, "color: #00ff00; font-weight: bold; font-size: 14px;");
if(finalItems.length > 0) {
console.log("Diese Items schaffen es in die Slideshow:");
finalItems.forEach(item => {
console.log(` 🎬 Name: ${item.Name}, DateCreated: ${item.DateCreated}`);
});
}
// Teste den Fallback
if(finalItems.length === 0 && items.length > 0) {
console.log("\n%c💡 HINWEIS: Da nach Filterung 0 Items übrig bleiben, greift in der Slideshow jetzt automatisch unser Fallback und zeigt zufällige Filme aller Jahre!", "color: orange;");
}
} catch (error) {
console.error("Fehler beim Abruf:", error);
}
})();

View File

@@ -0,0 +1,62 @@
(async () => {
const apiClient = window.ApiClient;
if (!apiClient) {
console.error("ApiClient not found. Are you logged in?");
return;
}
const userId = apiClient.getCurrentUserId();
const serverAddress = apiClient.serverAddress();
// Example test configuration flags
const maxItems = 50;
const includeWatchedContent = false; // set to false to ONLY show unplayed (newly watched)
const maxParentalRating = 12; // Test age limit
const maxDaysRecent = 30; // Test recency limit
// Build the query parameters just like in mediaBarEnhanced.js
const sortParams = "sortBy=Random";
const playedFilter = includeWatchedContent ? '' : '&isPlayed=False';
let parentalFilter = '';
if (maxParentalRating) {
parentalFilter = `&MaxOfficialRating=${maxParentalRating}`;
}
let dateFilter = '';
if (maxDaysRecent) {
const pastDate = new Date();
pastDate.setDate(pastDate.getDate() - maxDaysRecent);
dateFilter = `&MinDateCreated=${pastDate.toISOString()}`;
}
const apiUrl = `${serverAddress}/Items?IncludeItemTypes=Movie,Series&Recursive=true&hasOverview=true&imageTypes=Logo,Backdrop&${sortParams}${playedFilter}${parentalFilter}${dateFilter}&enableUserData=true&Limit=${maxItems}&fields=Id&userId=${userId}`;
try {
console.log(`Testing generated URL with filters:\n%c${apiUrl}`, "color: yellow;");
// Execute the fetch
const response = await fetch(apiUrl, {
headers: {
Authorization: `MediaBrowser Client="${apiClient.appName()}", Device="${apiClient.deviceName()}", DeviceId="${apiClient.deviceId()}", Version="${apiClient.appVersion()}", Token="${apiClient.accessToken()}"`
}
});
if (!response.ok) {
throw new Error(`Failed to fetch items: ${response.status} ${response.statusText}`);
}
const data = await response.json();
const items = data.Items || [];
console.log(`%cErgebnis: ${items.length} Items gefunden!`, "color: #00a4dc; font-weight: bold;");
if(items.length > 0) {
console.log("Erstes Item als Beispiel:");
console.dir(items[0]);
}
} catch (error) {
console.error("Fehler beim Abrufen der URL:", error);
}
})();

View File

@@ -1,462 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Media Bar Enhanced Configuration</title>
</head>
<body>
<div id="MediaBarEnhancedConfigurationPage" data-role="page" class="page type-interior pluginConfigurationPage"
data-require="emby-input,emby-button,emby-select,emby-checkbox,emby-textarea">
<div data-role="content">
<div class="content-primary">
<div class="sectionTitleContainer">
<h2 class="sectionTitle">Media Bar Enhanced</h2>
<a is="emby-linkbutton" class="raised raised-mini emby-button" style="margin-left: 2em;"
target="_blank" href="https://github.com/CodeDevMLH/jellyfin-plugin-media-bar-enhanced">
<i class="md-icon button-icon button-icon-left secondaryText"></i>
<span>${Help}</span>
</a>
</div>
<hr style="max-width: 800px; margin: 1em 0;">
<div style="margin-bottom: 1.5em;">
<button class="jellyfin-tab-button active" onclick="showTab('basic', this)"
style="background: none; border: none; color: #fff; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid #00a4dc;">
<h3>General Settings</h3>
</button>
<button class="jellyfin-tab-button" onclick="showTab('custom', this)"
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
<h3>Custom Content</h3>
</button>
<button class="jellyfin-tab-button" onclick="showTab('advanced', this)"
style="background: none; border: none; color: #ccc; cursor: pointer; transition: color 0.3s, border-bottom 0.3s; padding: 0.5em 1em; border-bottom: 2px solid transparent;">
<h3>Advanced Settings</h3>
</button>
</div>
<form id="mediaBarEnhancedConfigForm">
<!-- BASIC TAB -->
<div id="basic" class="tab-content">
<h2 class="sectionTitle">Main Plugin Settings</h2>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="IsEnabled" name="IsEnabled" />
<span>Enable Media Bar Enhanced Plugin</span>
</label>
<div class="fieldDescription">Enable or disable the entire plugin functionality.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableVideoBackdrop"
name="EnableVideoBackdrop" />
<span>Enable Trailer Backdrops</span>
</label>
<div class="fieldDescription">Show trailers as background if available.<br>Adds a
mute/unmute and pause/play button to control the video in the right top corner.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="WaitForTrailerToEnd"
name="WaitForTrailerToEnd" />
<span>Wait For Trailer To End</span>
</label>
<div class="fieldDescription">Delay slide transition until trailer finishes.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableMobileVideo"
name="EnableMobileVideo" />
<span>Enable Trailer On Mobile</span>
</label>
<div class="fieldDescription">Allow video playback on mobile devices.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="ShowTrailerButton"
name="ShowTrailerButton" />
<span>Show Trailer Button</span>
</label>
<div class="fieldDescription">Display a button to open trailer in modal. Only visible if
trailer is not set as backdrop or if no trailer is available.</div>
</div>
</div>
<!-- CUSTOM CONTENT TAB -->
<div id="custom" class="tab-content" style="display:none;">
<h2 class="sectionTitle">Custom Media IDs</h2>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableCustomMediaIds"
name="EnableCustomMediaIds" />
<span>Enable Custom Media IDs</span>
</label>
<div class="fieldDescription">If enabled, the slideshow will try to show the items listed
below. If the list is empty, default behavior (random items) is used. Disable this
to temporarily ignore your custom list without deleting it.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableSeasonalContent"
name="EnableSeasonalContent" />
<span>Enable Seasonal Content Mode</span>
</label>
<div class="fieldDescription">Enable this to define time-based lists in the field below.
</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="CustomMediaIds">Media/Collection/Playlist
IDs
(Newline or Comma separated)</label>
<textarea is="emby-textarea" id="CustomMediaIds" name="CustomMediaIds"
style="width: 100%; height: 150px; font-family: monospace;"></textarea>
<div class="fieldDescription" id="customMediaIdsDesc">Enter the IDs of the items you want to show in the slideshow.
You can separate them by new line or comma.
<br><br>
<b>Manual Trailer Override:</b> You can specify a YouTube URL for an item by adding it in
brackets: <br> <code>e.g. ID DESCRIPTION [https://youtu.be/...]</code> or <code>ID [https://youtu.be/...] DESCRIPTION</code>
<br><br>
You can also add a description after the ID using any separator like space, pipe
(|) or dash (-): <br>e.g. <code>ID DESCRIPTION</code> or <code>ID | DESCRIPTION</code>
<br><br>
<b>Note:</b> If using a <b>Collection Name</b> (instead of an ID) combined with a description, you <b>MUST</b> use
the pipe (|) separator.
<br>
<b>Note:</b> The separator <b>MUST NOT</b> be a hex character (0-9, a-f).</div>
<div class="fieldDescription" id="seasonalMediaIdsDesc" style="display: none;">
<b>Seasonal Mode Enabled:</b> Define lines with date ranges (Format: DD.MM-DD.MM |
<i>name</i> | <i>IDs</i>).<br>
Example:<br>
<code>20.10-31.10 | Halloween | ID1, ID2 [https://youtu.be/...]</code><br>
<code>01.12-26.12 | Christmas | ID3, ID4</code><br>
<i>Only lines matching the current date will be used. If no line matches, it will try to
use random items.</i>
</div>
<p>You can find the IDs of your items in the URL of the item page in the web interface.<br>
Example:
<code>https://your-jellyfin-url/web/#/details?id=<b style="color:red;">your-item-id</b>&serverId=your-server-id</code><br><br>
You can also insert a name of a collection or playlist to fetch the IDs of all items in
it (will take the first hit.<br><b>Note:</b> there is currently no feedback if the name
resolution succeeded, you will have to look if the bar displays the correct items.).
</p>
</div>
</div>
<!-- ADVANCED TAB -->
<div id="advanced" class="tab-content" style="display:none;">
<h2 class="sectionTitle">Features</h2>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="SlideAnimationEnabled"
name="SlideAnimationEnabled" />
<span>Enable Slide Animations</span>
</label>
<div class="fieldDescription">Enable the zooming-in effect on background images when a new slide is
shown (does not affect trailer backdrops). Attention: This may cause performance issues on weaker client hardware.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableClientSideSettings"
name="EnableClientSideSettings" />
<span>Enable Client-Side Settings</span>
</label>
<div class="fieldDescription">If enabled, users will see a media bar icon in the header to
override settings (like disabling the bar or trailer backdrops) locally on their device.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="UseSponsorBlock" name="UseSponsorBlock" />
<span>Use SponsorBlock</span>
</label>
<div class="fieldDescription">Skip intro/outro segments in YouTube trailers.</div>
</div>
<div class="selectContainer">
<label class="selectLabel" for="PreferredVideoQuality">Preferred YouTube Quality</label>
<select is="emby-select" id="PreferredVideoQuality" name="PreferredVideoQuality"
class="emby-select-withcolor emby-select">
<option value="Auto">Auto (Smart)</option>
<option value="Maximum">Maximum (4K+)</option>
<option value="1080p">1080p</option>
<option value="720p">720p</option>
</select>
<div class="fieldDescription">"Auto" selects Maximum if screen width > 1920px, otherwise
1080p.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="StartMuted" name="StartMuted" />
<span>Start Muted</span>
</label>
<div class="fieldDescription">Start trailer video playback muted. (Known issue: In the
Android/IOS app, backdrop trailers are always muted.)</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="FullWidthVideo" name="FullWidthVideo" />
<span>Full Width Video</span>
</label>
<div class="fieldDescription">Stretch video to full width. Very nice on desktops, on mobile
devices only the middle of the video is visible.<br>Disable to get the full aspect ratio
on
mobile devices. (looks bad on desktops)</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableLoadingScreen"
name="EnableLoadingScreen" />
<span>Enable Loading Screen</span>
</label>
<div class="fieldDescription">Show a loading screen while the slideshow initializes. (You
may have to reload the page twice)</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="AlwaysShowArrows"
name="AlwaysShowArrows" />
<span>Always Show Arrows</span>
</label>
<div class="fieldDescription">If enabled, navigation arrows will always be visible instead
of only on hover.</div>
</div>
<div class="checkboxContainer checkboxContainer-withDescription">
<label>
<input is="emby-checkbox" type="checkbox" id="EnableKeyboardControls"
name="EnableKeyboardControls" />
<span>Enable Keyboard Controls</span>
</label>
<div class="fieldDescription">Enable keyboard shortcuts (Arrows left/right (change slide),
Space (pause), M (mute/unmute)) for
the slideshow.</div>
</div>
<h2 class="sectionTitle">Time Settings</h2>
<p>Leave a setting blank to use the default value.</p>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="ShuffleInterval">Shuffle Interval
(ms)</label>
<input is="emby-input" type="number" id="ShuffleInterval" name="ShuffleInterval" />
<div class="fieldDescription">Time in milliseconds between changing slides.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="RetryInterval">Retry Interval
(ms)</label>
<input is="emby-input" type="number" id="RetryInterval" name="RetryInterval" />
<div class="fieldDescription">Time in milliseconds to wait before retrying failed
operations.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="LoadingCheckInterval">Loading Check
Interval (ms)</label>
<input is="emby-input" type="number" id="LoadingCheckInterval"
name="LoadingCheckInterval" />
<div class="fieldDescription">Frequency of checking wether the login screen or home screen
has loaded (in milliseconds).</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="FadeTransitionDuration">Fade
Transition Duration (ms)</label>
<input is="emby-input" type="number" id="FadeTransitionDuration"
name="FadeTransitionDuration" />
<div class="fieldDescription">Duration in milliseconds of the transition between slides.
</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MinSwipeDistance">Min Swipe Distance
(px)</label>
<input is="emby-input" type="number" id="MinSwipeDistance" name="MinSwipeDistance" />
<div class="fieldDescription">Minimum distance in pixels for a swipe to be registered (for
mobile).</div>
</div>
<h2 class="sectionTitle">Content Limits</h2>
<p>Leave a setting blank to use the default value.</p>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxItems">Total Max Items</label>
<input is="emby-input" type="number" id="MaxItems" name="MaxItems" />
<div class="fieldDescription">Maximum total items to fetch (for all content types combined).
</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxMovies">Max Movies</label>
<input is="emby-input" type="number" id="MaxMovies" name="MaxMovies" />
<div class="fieldDescription">Maximum movies to include in slideshow (for random selection).
</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxTvShows">Max TV Shows</label>
<input is="emby-input" type="number" id="MaxTvShows" name="MaxTvShows" />
<div class="fieldDescription">Maximum TV shows to include in slideshow (for random
selection).</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="PreloadCount">Preload Count</label>
<input is="emby-input" type="number" id="PreloadCount" name="PreloadCount" />
<div class="fieldDescription">Number of images to preload.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxPaginationDots">Max Pagination
Dots</label>
<input is="emby-input" type="number" id="MaxPaginationDots" name="MaxPaginationDots" />
<div class="fieldDescription">Maximum number of dots to show in navigation. If the number
will be exceeded, the dots will "turn" into a counter style (e.g. 1/100). Set to 0 to
enable counter style directly.</div>
</div>
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="MaxPlotLength">Max Plot
Length</label>
<input is="emby-input" type="number" id="MaxPlotLength" name="MaxPlotLength" />
<div class="fieldDescription">Maximum characters for the plot summary.</div>
</div>
</div>
<div
style="background-color: rgba(255, 255, 255, 0.05); border-left: 4px solid #00a4dc; border-radius: 4px; padding: 1em 1.5em; margin: 1.5em 0; display: flex; align-items: center; gap: 1em;">
<i class="material-icons" style="color: #00a4dc; font-size: 24px;">info</i>
<div>
All changes require a page refresh (ctrl + r or F5) after saving for changes to take effect.
<br />
If old settings persist, please force clear browser cache.
</div>
</div>
<div>
<button is="emby-button" type="submit" class="raised button-submit block emby-button">
<span>${Save}</span>
</button>
<button is="emby-button" type="button" class="raised button-cancel block btnCancel"
onclick="history.back();">
<span>${ButtonCancel}</span>
</button>
</div>
</form>
</div>
</div>
<script>
function showTab(tabId, btn) {
document.querySelectorAll('.tab-content').forEach(el => el.style.display = 'none');
document.getElementById(tabId).style.display = 'block';
document.querySelectorAll('.jellyfin-tab-button').forEach(b => {
b.classList.remove('active');
b.style.color = '#ccc';
b.style.borderBottom = '2px solid transparent';
});
if (btn) {
btn.classList.add('active');
btn.style.color = '#fff';
btn.style.borderBottom = '2px solid #00a4dc';
}
}
var MediaBarEnhancedConfigurationPage = {
pluginId: 'd7e11d57-819b-4bdd-a88d-53c5f5560225',
loadConfiguration: function (page) {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(MediaBarEnhancedConfigurationPage.pluginId).then(function (config) {
var keys = [
'IsEnabled', 'ShuffleInterval', 'RetryInterval', 'MinSwipeDistance',
'LoadingCheckInterval', 'MaxPlotLength', 'MaxMovies', 'MaxTvShows',
'MaxItems', 'PreloadCount', 'FadeTransitionDuration', 'MaxPaginationDots',
'SlideAnimationEnabled', 'EnableVideoBackdrop', 'UseSponsorBlock',
'WaitForTrailerToEnd', 'StartMuted', 'FullWidthVideo', 'EnableMobileVideo',
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
'EnableSeasonalContent', 'EnableClientSideSettings'
];
keys.forEach(function (key) {
var el = page.querySelector('#' + key);
if (el) {
if (el.type === 'checkbox') {
el.checked = config[key];
} else {
el.value = config[key];
}
}
});
// Handle Seasonal UI logic
var seasonalCheckbox = page.querySelector('#EnableSeasonalContent');
var normalDesc = page.querySelector('#customMediaIdsDesc');
var seasonalDesc = page.querySelector('#seasonalMediaIdsDesc');
function updateDesc() {
if (seasonalCheckbox && seasonalCheckbox.checked) {
if (normalDesc) normalDesc.style.display = 'none';
if (seasonalDesc) seasonalDesc.style.display = 'block';
} else {
if (normalDesc) normalDesc.style.display = 'block';
if (seasonalDesc) seasonalDesc.style.display = 'none';
}
}
if (seasonalCheckbox) {
seasonalCheckbox.addEventListener('change', updateDesc);
updateDesc();
}
Dashboard.hideLoadingMsg();
});
},
saveConfiguration: function (page) {
Dashboard.showLoadingMsg();
var config = {};
var keys = [
'IsEnabled', 'ShuffleInterval', 'RetryInterval', 'MinSwipeDistance',
'LoadingCheckInterval', 'MaxPlotLength', 'MaxMovies', 'MaxTvShows',
'MaxItems', 'PreloadCount', 'FadeTransitionDuration', 'MaxPaginationDots',
'SlideAnimationEnabled', 'EnableVideoBackdrop', 'UseSponsorBlock',
'WaitForTrailerToEnd', 'StartMuted', 'FullWidthVideo', 'EnableMobileVideo',
'ShowTrailerButton', 'AlwaysShowArrows', 'EnableKeyboardControls',
'EnableCustomMediaIds', 'CustomMediaIds', 'EnableLoadingScreen',
'EnableSeasonalContent', 'EnableClientSideSettings'
];
keys.forEach(function (key) {
var el = page.querySelector('#' + key);
if (el) {
if (el.type === 'checkbox') {
config[key] = el.checked;
} else {
config[key] = (el.type === 'number') ? parseInt(el.value, 10) : el.value;
}
}
});
ApiClient.updatePluginConfiguration(MediaBarEnhancedConfigurationPage.pluginId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
}
};
document.querySelector('#MediaBarEnhancedConfigurationPage').addEventListener('pageshow', function () {
MediaBarEnhancedConfigurationPage.loadConfiguration(this);
});
document.querySelector('#mediaBarEnhancedConfigForm').addEventListener('submit', function (e) {
e.preventDefault();
MediaBarEnhancedConfigurationPage.saveConfiguration(document.querySelector('#MediaBarEnhancedConfigurationPage'));
return false;
});
</script>
<style>
.jellyfin-tab-button.active {
color: #fff !important;
border-bottom: 2px solid #00a4dc !important;
}
</style>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff