From ec448413569ddc2f24bb856d29084169979f9f05 Mon Sep 17 00:00:00 2001 From: sct Date: Mon, 1 Feb 2021 12:00:41 +0000 Subject: [PATCH] fix(radarr): correctly set requested status after sending to radarr (with auto approve) --- server/entity/MediaRequest.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/entity/MediaRequest.ts b/server/entity/MediaRequest.ts index 3c0900357..4337d0144 100644 --- a/server/entity/MediaRequest.ts +++ b/server/entity/MediaRequest.ts @@ -415,6 +415,15 @@ export class MediaRequest { searchNow: !radarrSettings.preventSearch, }) .then(async (radarrMovie) => { + // We grab media again here to make sure we have the latest version of it + const media = await mediaRepository.findOne({ + where: { id: this.media.id }, + }); + + if (!media) { + throw new Error('Media data is missing'); + } + media[this.is4k ? 'externalServiceId4k' : 'externalServiceId'] = radarrMovie.id; media[this.is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] =