fix(job): handle media removal for 4k on the same server (#1543)

This PR fixes a bug where the avaibility sync job was not removing properly 4k items when the same
Radarr server was used for both non-4k and 4k media.
This commit is contained in:
Gauthier
2025-03-31 10:40:30 +02:00
committed by GitHub
parent 29034b350d
commit 63dc27d400
2 changed files with 37 additions and 1 deletions

View File

@@ -747,7 +747,11 @@ class AvailabilitySync {
}
if (radarr && radarr.hasFile) {
existsInRadarr = true;
const resolution =
radarr?.movieFile?.mediaInfo?.resolution?.split('x');
const is4kMovie =
resolution?.length === 2 && Number(resolution[0]) >= 2000;
existsInRadarr = is4k ? is4kMovie : !is4kMovie;
}
} catch (ex) {
if (!ex.message.includes('404')) {