From f295e1c90d1106464b7b6ab84c9bd94912c02273 Mon Sep 17 00:00:00 2001 From: Gronod Date: Tue, 19 May 2026 21:47:12 +0100 Subject: [PATCH] debug(sse): Add SAB matching stats to trace filtering Shows how many SAB items were checked vs how many matched to Sonarr/Radarr. This will help diagnose why only ~10 of 60 SAB items are appearing. --- server/routes/dashboard.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/routes/dashboard.js b/server/routes/dashboard.js index a3253da..d045b34 100644 --- a/server/routes/dashboard.js +++ b/server/routes/dashboard.js @@ -1003,10 +1003,13 @@ router.get('/stream', requireAuth, async (req, res) => { } // SABnzbd queue + let sabSlotsChecked = 0; + let sabSlotsMatched = 0; if (sabnzbdQueue.data.queue && sabnzbdQueue.data.queue.slots) { for (const slot of sabnzbdQueue.data.queue.slots) { const nzbName = slot.filename || slot.nzbname; if (!nzbName) continue; + sabSlotsChecked++; const slotState = getSlotStatusAndSpeed(slot); const nzbNameLower = nzbName.toLowerCase(); @@ -1015,6 +1018,7 @@ router.get('/stream', requireAuth, async (req, res) => { return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle)); }); if (sonarrMatch && sonarrMatch.seriesId) { + sabSlotsMatched++; const series = seriesMap.get(sonarrMatch.seriesId) || sonarrMatch.series; if (series) { const allTags = extractAllTags(series.tags, sonarrTagMap); @@ -1167,6 +1171,7 @@ router.get('/stream', requireAuth, async (req, res) => { } // Write SSE event + console.log(`[SSE] SAB matching: ${sabSlotsChecked} checked, ${sabSlotsMatched} matched to Sonarr/Radarr`); console.log(`[SSE] Sending ${userDownloads.length} downloads for ${user.name}`); if (userDownloads.length > 0) { console.log(`[SSE] Download titles: ${userDownloads.map(d => d.title).join(', ')}`);