From 922b35098308efd4254fc68f30be08143eb9b417 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:19:20 -0700 Subject: [PATCH] Show all server playlists with synced/unsynced visual separation Server Playlists tab now displays ALL playlists from the media server, split into two sections: Synced Playlists (with mirrored/history match, full opacity, "Synced" badge, "Open Editor" action) and Other Server Playlists (everything else, dimmed at 70%, "View Tracks" action). Both sections have header with icon, title, and count. Unsynced cards fade to full opacity on hover. --- webui/static/script.js | 62 ++++++++++++++++++++++++++++++++++-------- webui/static/style.css | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 12 deletions(-) diff --git a/webui/static/script.js b/webui/static/script.js index 38ed34f3..dc88a497 100644 --- a/webui/static/script.js +++ b/webui/static/script.js @@ -74151,20 +74151,29 @@ async function loadServerPlaylists() { return; } - // Only show server playlists that have a matching mirrored playlist or sync history entry + // Separate synced vs non-synced playlists const mirroredNames = new Set(mirroredAll.map(p => p.name.trim().toLowerCase())); const syncedNames = new Set(historyNames.map(n => n.trim().toLowerCase())); - const filtered = data.playlists.filter(pl => { + const synced = []; + const unsynced = []; + for (const pl of data.playlists) { const key = pl.name.trim().toLowerCase(); - return mirroredNames.has(key) || syncedNames.has(key); - }); + if (mirroredNames.has(key) || syncedNames.has(key)) { + pl._synced = true; + synced.push(pl); + } else { + pl._synced = false; + unsynced.push(pl); + } + } - _serverPlaylists = filtered; + _serverPlaylists = [...synced, ...unsynced]; const title = document.getElementById('server-tab-title'); - if (title) title.textContent = `Server Playlists (${data.server_type ? data.server_type.charAt(0).toUpperCase() + data.server_type.slice(1) : ''})`; + const serverName = data.server_type ? data.server_type.charAt(0).toUpperCase() + data.server_type.slice(1) : ''; + if (title) title.textContent = `Server Playlists (${serverName})`; - if (filtered.length === 0) { - if (container) container.innerHTML = '