Isolate per-item Radarr failures in RecommendationPipeline.autoRequest

Matches the Go original's behavior: a lookup/addMovie failure for one
recommendation is logged and skipped rather than aborting the whole
auto-request batch.
This commit is contained in:
2026-08-12 21:18:33 +02:00
parent 62848f6ecd
commit 3c5f723d22
2 changed files with 46 additions and 2 deletions

View File

@@ -90,8 +90,12 @@ export class RecommendationPipeline extends LlmPipeline<RecommendationRequest, R
async autoRequest(recommendations: Recommendation[]): Promise<void> {
if (!this.options.radarr) return;
for (const rec of recommendations) {
const movie = await this.options.radarr.lookup(rec.tmdbId);
await this.options.radarr.addMovie(movie);
try {
const movie = await this.options.radarr.lookup(rec.tmdbId);
await this.options.radarr.addMovie(movie);
} catch (err) {
this.logger.error({ err, tmdbId: rec.tmdbId, title: rec.title }, 'Radarr auto-request failed');
}
}
}