From 23428ebafc2f4f5e37f230ce6194e1cef92b855e Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Thu, 5 Feb 2026 19:34:49 -0500 Subject: [PATCH] Add Render Mode option for default discovery sections --- configuration/homeScreen-configuration.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configuration/homeScreen-configuration.js b/configuration/homeScreen-configuration.js index 3b2a379..3d9455e 100644 --- a/configuration/homeScreen-configuration.js +++ b/configuration/homeScreen-configuration.js @@ -68,6 +68,7 @@ const CARD_FORMATS = ['Poster', 'Thumb', 'Backdrop', 'Square', 'Random']; const SORT_ORDERS = ['Random', 'Name', 'DateCreated', 'PremiereDate', 'CommunityRating', 'CriticRating', 'DatePlayed', 'SortName', 'PlayCount', 'PlayedPercentage', 'StartDate', 'Runtime', 'ProductionYear', 'IsPlayed', 'IsUnplayed', 'ParentIndexNumber', 'IndexNumber']; const SORT_ORDER_DIRECTIONS = ['Ascending', 'Descending']; + const RENDER_MODE_OPTIONS = [{ value: 'Normal', label: 'Normal' }, { value: 'Spotlight', label: 'Spotlight' }, { value: 'Random', label: 'Random' }]; // Current config state let currentConfig = null; @@ -2570,8 +2571,8 @@ ${buildSelect('discovery-sortOrder', SORT_ORDERS, section.sortOrder || 'Random', 'Sort Order')} ${section.sortOrderDirection ? buildSelect('discovery-sortOrderDirection', SORT_ORDER_DIRECTIONS, section.sortOrderDirection || 'Ascending', 'Sort Order Direction') : ''} ${buildSelect('discovery-cardFormat', CARD_FORMATS, section.cardFormat || 'Poster', 'Card Format')} - ${buildTextInput('discovery-ttl', section.ttl !== undefined ? section.ttl : '', 'TTL (ms)', 'number')} - ${buildCheckbox('discovery-spotlight', section.spotlight === true, 'Spotlight')} + ${buildTextInput('discovery-ttl', section.ttl !== undefined ? section.ttl : '', 'TTL (ms)', 'number')} + ${buildSelect('discovery-renderMode', RENDER_MODE_OPTIONS, section.renderMode || 'Normal', 'Render Mode')} `; } @@ -2582,7 +2583,7 @@ * @param {Object} originalSection - Original section data (for preserving hidden fields in default sections) */ function collectSectionEditorData(isDiscovery = false, originalSection = null) { - const dialog = document.querySelector(`.dialogContainer[data-modal-id="${SECTION_EDITOR_MODAL_ID}"]`); + const dialog = document.querySelector(`.dialogContainer[data-modal-id="${SECTION_EDITOR_MODAL_ID}"]`) || document.querySelector(`.dialogContainer[data-modal-id="${DISCOVERY_EDITOR_MODAL_ID}"]`); if (!dialog) return null; if (isDiscovery) {