Add detailed logging for all series/movies with raw tag IDs to debug missing items
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user