Add detailed logging for all series/movies with raw tag IDs to debug missing items
Build and Push Docker Image / build (push) Successful in 36s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m2s
CI / Security audit (push) Successful in 1m7s
CI / Tests & coverage (push) Has been cancelled

This commit is contained in:
2026-05-21 01:01:14 +01:00
parent d9f1fc99a9
commit 4ff462b7f4
+8 -2
View File
@@ -271,10 +271,14 @@ router.get('/recent', requireAuth, async (req, res) => {
const series = record.series;
if (!series) continue;
const rawTagIds = series.tags || [];
const allTags = extractAllTags(series.tags, sonarrTagMap);
const matchedUserTag = extractUserTag(series.tags, sonarrTagMap, username);
const hasAnyTag = allTags.length > 0;
// Log all series to see what's coming through
console.log(`[History] Series: "${series.title}" - raw tag IDs: [${rawTagIds.join(', ') || 'none'}], resolved tags: [${allTags.join(', ') || 'none'}], matchedUserTag: ${matchedUserTag || 'none'}`);
if (!(showAll ? hasAnyTag : !!matchedUserTag)) {
console.log(`[History] Filtered out series "${series.title}" - tags: [${allTags.join(', ') || 'none'}], matchedUserTag: ${matchedUserTag || 'none'}, username: ${username}, showAll: ${showAll}`);
continue;
@@ -322,12 +326,14 @@ router.get('/recent', requireAuth, async (req, res) => {
if (outcome === 'other') continue;
const movie = record.movie;
if (!movie) continue;
const rawTagIds = movie.tags || [];
const allTags = extractAllTags(movie.tags, radarrTagMap);
const matchedUserTag = extractUserTag(movie.tags, radarrTagMap, username);
const hasAnyTag = allTags.length > 0;
// Log all movies to see what's coming through
console.log(`[History] Movie: "${movie.title}" - raw tag IDs: [${rawTagIds.join(', ') || 'none'}], resolved tags: [${allTags.join(', ') || 'none'}], matchedUserTag: ${matchedUserTag || 'none'}`);
if (!(showAll ? hasAnyTag : !!matchedUserTag)) {
console.log(`[History] Filtered out movie "${movie.title}" - tags: [${allTags.join(', ') || 'none'}], matchedUserTag: ${matchedUserTag || 'none'}, username: ${username}, showAll: ${showAll}`);
continue;