fix(radarr): correctly set requested status after sending to radarr (with auto approve)

This commit is contained in:
sct
2021-02-01 12:00:41 +00:00
parent 43c989e423
commit ec44841356

View File

@@ -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'] =