fix(radarr): correctly check for existing movies (#2490)

pull/2489/head
Danshil Kokil Mungur 3 years ago committed by GitHub
parent 92b2d32d2e
commit 5d4b06bbcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,6 @@ export interface RadarrMovie {
profileId: number; profileId: number;
qualityProfileId: number; qualityProfileId: number;
added: string; added: string;
downloaded: boolean;
hasFile: boolean; hasFile: boolean;
} }
@ -85,7 +84,7 @@ class RadarrAPI extends ServarrBase<{ movieId: number }> {
try { try {
const movie = await this.getMovieByTmdbId(options.tmdbId); const movie = await this.getMovieByTmdbId(options.tmdbId);
if (movie.downloaded) { if (movie.hasFile) {
logger.info( logger.info(
'Title already exists and is available. Skipping add and returning success', 'Title already exists and is available. Skipping add and returning success',
{ {

@ -73,7 +73,7 @@ class RadarrScanner
} }
private async processRadarrMovie(radarrMovie: RadarrMovie): Promise<void> { private async processRadarrMovie(radarrMovie: RadarrMovie): Promise<void> {
if (!radarrMovie.monitored && !radarrMovie.downloaded) { if (!radarrMovie.monitored && !radarrMovie.hasFile) {
this.log( this.log(
'Title is unmonitored and has not been downloaded. Skipping item.', 'Title is unmonitored and has not been downloaded. Skipping item.',
'debug', 'debug',
@ -92,7 +92,7 @@ class RadarrScanner
externalServiceId: radarrMovie.id, externalServiceId: radarrMovie.id,
externalServiceSlug: radarrMovie.titleSlug, externalServiceSlug: radarrMovie.titleSlug,
title: radarrMovie.title, title: radarrMovie.title,
processing: !radarrMovie.downloaded, processing: !radarrMovie.hasFile,
}); });
} catch (e) { } catch (e) {
this.log('Failed to process Radarr media', 'error', { this.log('Failed to process Radarr media', 'error', {

Loading…
Cancel
Save