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
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:
@@ -4,6 +4,8 @@ export type AvailableCacheIds =
|
|||||||
| 'tmdb'
|
| 'tmdb'
|
||||||
| 'radarr'
|
| 'radarr'
|
||||||
| 'sonarr'
|
| 'sonarr'
|
||||||
|
| 'lidarr'
|
||||||
|
| 'readarr'
|
||||||
| 'rt'
|
| 'rt'
|
||||||
| 'imdb'
|
| 'imdb'
|
||||||
| 'github'
|
| 'github'
|
||||||
@@ -50,6 +52,8 @@ class CacheManager {
|
|||||||
}),
|
}),
|
||||||
radarr: new Cache('radarr', 'Radarr API'),
|
radarr: new Cache('radarr', 'Radarr API'),
|
||||||
sonarr: new Cache('sonarr', 'Sonarr API'),
|
sonarr: new Cache('sonarr', 'Sonarr API'),
|
||||||
|
lidarr: new Cache('lidarr', 'Lidarr API'),
|
||||||
|
readarr: new Cache('readarr', 'Readarr API'),
|
||||||
rt: new Cache('rt', 'Rotten Tomatoes API', {
|
rt: new Cache('rt', 'Rotten Tomatoes API', {
|
||||||
stdTtl: 43200,
|
stdTtl: 43200,
|
||||||
checkPeriod: 60 * 30,
|
checkPeriod: 60 * 30,
|
||||||
|
|||||||
@@ -737,7 +737,9 @@ discoverRoutes.get('/trending', async (req, res, next) => {
|
|||||||
}),
|
}),
|
||||||
} as const;
|
} 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(
|
const media = await Media.getRelatedMedia(
|
||||||
req.user,
|
req.user,
|
||||||
|
|||||||
Reference in New Issue
Block a user