Enable custom media IDs by default and improve GUID handling in slideshow manager for seperator and description

This commit is contained in:
CodeDevMLH
2026-01-08 03:07:15 +01:00
parent 1ee4aaefb5
commit 24ac119e01

View File

@@ -44,7 +44,7 @@ const CONFIG = {
showTrailerButton: true, showTrailerButton: true,
enableKeyboardControls: true, enableKeyboardControls: true,
alwaysShowArrows: false, alwaysShowArrows: false,
enableCustomMediaIds: false, enableCustomMediaIds: true,
enableSeasonalContent: false, enableSeasonalContent: false,
customMediaIds: "", customMediaIds: "",
enableLoadingScreen: true, enableLoadingScreen: true,
@@ -2514,17 +2514,23 @@ const SlideshowManager = {
try { try {
let id = rawId; 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)) { if (!guidRegex.test(rawId)) {
console.log(`Input '${rawId}' is not a GUID, searching for Collection/Playlist by name...`); const guidMatch = rawId.match(/^([0-9a-f]{32})(?:[^0-9a-f]|$)/i);
const resolvedId = await ApiUtils.findCollectionOrPlaylistByName(rawId);
if (resolvedId) { if (guidMatch) {
console.log(`Resolved name '${rawId}' to ID: ${resolvedId}`); id = guidMatch[1];
id = resolvedId;
} else { } else {
console.warn(`Could not find Collection or Playlist with name: '${rawId}'`); console.log(`Input '${rawId}' is not a GUID, searching for Collection/Playlist by name...`);
continue; // Skip if resolution failed 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
}
} }
} }