debug(sonarr): Log all available Sonarr queue fields
All checks were successful
Build and Push Docker Image / build (push) Successful in 28s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m9s
CI / Security audit (push) Successful in 1m25s
CI / Tests & coverage (push) Successful in 1m39s

Shows title, sourceTitle, series.title, episode.title for
each Sonarr queue item to understand the data structure.
This commit is contained in:
2026-05-19 22:04:11 +01:00
parent 9d0e31ec9a
commit f1d9de2a92

View File

@@ -1039,8 +1039,11 @@ router.get('/stream', requireAuth, async (req, res) => {
} else { } else {
console.log(`[SSE] ✗ No match for SAB: "${nzbNameLower.substring(0, 60)}"`); console.log(`[SSE] ✗ No match for SAB: "${nzbNameLower.substring(0, 60)}"`);
// Show actual Sonarr titles to debug matching // Show actual Sonarr titles to debug matching
const sonarrTitles = sonarrQueue.data.records.slice(0, 5).map(r => (r.title || r.sourceTitle || 'NO_TITLE').substring(0, 50)); const sonarrTitles = sonarrQueue.data.records.slice(0, 5).map(r => {
console.log(`[SSE] Sonarr titles: ${sonarrTitles.join(' | ')}`); const fields = {title: r.title, sourceTitle: r.sourceTitle, seriesTitle: r.series?.title, episodeTitle: r.episode?.title};
return JSON.stringify(fields).substring(0, 80);
});
console.log(`[SSE] Sonarr fields: ${sonarrTitles.join(' | ')}`);
} }
} }
if (sonarrMatch && sonarrMatch.seriesId) { if (sonarrMatch && sonarrMatch.seriesId) {