mirror of
https://github.com/FJurmanovic/sugarr.git
synced 2026-11-11 15:51:09 +00:00
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:
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user