debug(sse): Add SAB matching stats to trace filtering
All checks were successful
All checks were successful
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.
This commit is contained in:
@@ -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(', ')}`);
|
||||
|
||||
Reference in New Issue
Block a user