debug(sse): Add detailed name matching logging
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();
|
const rTitle = (r.title || r.sourceTitle || '').toLowerCase();
|
||||||
return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle));
|
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) {
|
if (sonarrMatch && sonarrMatch.seriesId) {
|
||||||
sabSlotsMatched++;
|
sabSlotsMatched++;
|
||||||
const series = seriesMap.get(sonarrMatch.seriesId) || sonarrMatch.series;
|
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 => {
|
// Handle Radarr match (radarrMatch already declared above)
|
||||||
const rTitle = (r.title || r.sourceTitle || '').toLowerCase();
|
|
||||||
return rTitle && (rTitle.includes(nzbNameLower) || nzbNameLower.includes(rTitle));
|
|
||||||
});
|
|
||||||
if (radarrMatch && radarrMatch.movieId) {
|
if (radarrMatch && radarrMatch.movieId) {
|
||||||
|
sabSlotsMatched++;
|
||||||
const movie = moviesMap.get(radarrMatch.movieId) || radarrMatch.movie;
|
const movie = moviesMap.get(radarrMatch.movieId) || radarrMatch.movie;
|
||||||
if (movie) {
|
if (movie) {
|
||||||
const allTags = extractAllTags(movie.tags, radarrTagMap);
|
const allTags = extractAllTags(movie.tags, radarrTagMap);
|
||||||
|
|||||||
Reference in New Issue
Block a user