From 5d4b06bbcc6cf6d328f6b4a86c4c0f9b0f3aff3e Mon Sep 17 00:00:00 2001 From: Danshil Kokil Mungur Date: Thu, 3 Feb 2022 05:14:04 +0400 Subject: [PATCH] fix(radarr): correctly check for existing movies (#2490) --- server/api/servarr/radarr.ts | 3 +-- server/lib/scanners/radarr/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/api/servarr/radarr.ts b/server/api/servarr/radarr.ts index 33e1a7afe..7305baf09 100644 --- a/server/api/servarr/radarr.ts +++ b/server/api/servarr/radarr.ts @@ -27,7 +27,6 @@ export interface RadarrMovie { profileId: number; qualityProfileId: number; added: string; - downloaded: boolean; hasFile: boolean; } @@ -85,7 +84,7 @@ class RadarrAPI extends ServarrBase<{ movieId: number }> { try { const movie = await this.getMovieByTmdbId(options.tmdbId); - if (movie.downloaded) { + if (movie.hasFile) { logger.info( 'Title already exists and is available. Skipping add and returning success', { diff --git a/server/lib/scanners/radarr/index.ts b/server/lib/scanners/radarr/index.ts index 71d687dc7..5f47b9d97 100644 --- a/server/lib/scanners/radarr/index.ts +++ b/server/lib/scanners/radarr/index.ts @@ -73,7 +73,7 @@ class RadarrScanner } private async processRadarrMovie(radarrMovie: RadarrMovie): Promise { - if (!radarrMovie.monitored && !radarrMovie.downloaded) { + if (!radarrMovie.monitored && !radarrMovie.hasFile) { this.log( 'Title is unmonitored and has not been downloaded. Skipping item.', 'debug', @@ -92,7 +92,7 @@ class RadarrScanner externalServiceId: radarrMovie.id, externalServiceSlug: radarrMovie.titleSlug, title: radarrMovie.title, - processing: !radarrMovie.downloaded, + processing: !radarrMovie.hasFile, }); } catch (e) { this.log('Failed to process Radarr media', 'error', {