From 24ac119e01a27d86c969088c1478112041b3456b Mon Sep 17 00:00:00 2001 From: CodeDevMLH <145071728+CodeDevMLH@users.noreply.github.com> Date: Thu, 8 Jan 2026 03:07:15 +0100 Subject: [PATCH] Enable custom media IDs by default and improve GUID handling in slideshow manager for seperator and description --- .../Web/mediaBarEnhanced.js | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js index c68c167..5ee298d 100644 --- a/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js +++ b/Jellyfin.Plugin.MediaBarEnhanced/Web/mediaBarEnhanced.js @@ -44,7 +44,7 @@ const CONFIG = { showTrailerButton: true, enableKeyboardControls: true, alwaysShowArrows: false, - enableCustomMediaIds: false, + enableCustomMediaIds: true, enableSeasonalContent: false, customMediaIds: "", enableLoadingScreen: true, @@ -2514,17 +2514,23 @@ const SlideshowManager = { try { let id = rawId; - // If not a valid GUID, treat as a name and search + // If not a valid GUID, check if it starts with one (comments) or treat as a name if (!guidRegex.test(rawId)) { - console.log(`Input '${rawId}' is not a GUID, searching for Collection/Playlist by name...`); - const resolvedId = await ApiUtils.findCollectionOrPlaylistByName(rawId); + const guidMatch = rawId.match(/^([0-9a-f]{32})(?:[^0-9a-f]|$)/i); - if (resolvedId) { - console.log(`Resolved name '${rawId}' to ID: ${resolvedId}`); - id = resolvedId; + if (guidMatch) { + id = guidMatch[1]; } else { - console.warn(`Could not find Collection or Playlist with name: '${rawId}'`); - continue; // Skip if resolution failed + console.log(`Input '${rawId}' is not a GUID, searching for Collection/Playlist by name...`); + const resolvedId = await ApiUtils.findCollectionOrPlaylistByName(rawId); + + if (resolvedId) { + console.log(`Resolved name '${rawId}' to ID: ${resolvedId}`); + id = resolvedId; + } else { + console.warn(`Could not find Collection or Playlist with name: '${rawId}'`); + continue; // Skip if resolution failed + } } }