debug(sse): Add detailed name matching logging
All checks were successful
All checks were successful
Shows exactly which SAB items match/don't match to Sonarr/Radarr: - ✓ Sonarr match: SAB name → Sonarr name - ✓ Radarr match: SAB name → Radarr name - ✗ No match: SAB name (with Sonarr queue count) This will help diagnose why Sonarr Activity Queue shows matches but Sofarr doesn't.
This commit is contained in:
@@ -1017,6 +1017,21 @@ router.get('/stream', requireAuth, async (req, res) => {
|
||||
const rTitle = (r.title || r.sourceTitle || '').toLowerCase();
|
||||
return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle));
|
||||
});
|
||||
const radarrMatch = radarrQueue.data.records.find(r => {
|
||||
const rTitle = (r.title || r.sourceTitle || '').toLowerCase();
|
||||
return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle));
|
||||
});
|
||||
// Debug first 5 items - show matches and non-matches
|
||||
if (sabSlotsChecked <= 5) {
|
||||
if (sonarrMatch) {
|
||||
console.log(`[SSE] ✓ Sonarr match: SAB:"${nzbNameLower.substring(0, 50)}" → Sonarr:"${(sonarrMatch.title || sonarrMatch.sourceTitle || '').substring(0, 50)}"`);
|
||||
} else if (radarrMatch) {
|
||||
console.log(`[SSE] ✓ Radarr match: SAB:"${nzbNameLower.substring(0, 50)}" → Radarr:"${(radarrMatch.title || radarrMatch.sourceTitle || '').substring(0, 50)}"`);
|
||||
} else {
|
||||
console.log(`[SSE] ✗ No match for SAB: "${nzbNameLower.substring(0, 60)}"`);
|
||||
console.log(`[SSE] Sonarr queue has ${sonarrQueue.data.records.length} items`);
|
||||
}
|
||||
}
|
||||
if (sonarrMatch && sonarrMatch.seriesId) {
|
||||
sabSlotsMatched++;
|
||||
const series = seriesMap.get(sonarrMatch.seriesId) || sonarrMatch.series;
|
||||
@@ -1034,11 +1049,9 @@ router.get('/stream', requireAuth, async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
const radarrMatch = radarrQueue.data.records.find(r => {
|
||||
const rTitle = (r.title || r.sourceTitle || '').toLowerCase();
|
||||
return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle));
|
||||
});
|
||||
// Handle Radarr match (radarrMatch already declared above)
|
||||
if (radarrMatch && radarrMatch.movieId) {
|
||||
sabSlotsMatched++;
|
||||
const movie = moviesMap.get(radarrMatch.movieId) || radarrMatch.movie;
|
||||
if (movie) {
|
||||
const allTags = extractAllTags(movie.tags, radarrTagMap);
|
||||
|
||||
Reference in New Issue
Block a user