Fix cache IDs and discover route for music/book types
Some checks failed
Rebuild Issue Index / build-index (push) Has been cancelled
Close Stale Issues and PRs / Close stale issues and PRs (push) Has been cancelled
Trivy Container Vulnerability Scan / Scan latest container image (push) Has been cancelled
Check Docs Links / Verify external links in Markdown and MDX (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled

This commit is contained in:
root
2026-04-04 12:31:10 -05:00
parent 206f586a11
commit 2dc143faf7
2 changed files with 7 additions and 1 deletions

View File

@@ -737,7 +737,9 @@ discoverRoutes.get('/trending', async (req, res, next) => {
}),
} as const;
const { data, mapper, type } = await trendingFetchers[mediaType]();
// Music/book don't have TMDB trending - fall back to 'all'
const fetcherKey = (mediaType === 'music' || mediaType === 'book') ? 'all' : mediaType;
const { data, mapper, type } = await trendingFetchers[fetcherKey]();
const media = await Media.getRelatedMedia(
req.user,