Skip to content

Commit

Permalink
Merge pull request #181 from raydak-labs/fix/issue-180
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackDark authored Feb 3, 2025
2 parents af371de + 9ab962b commit cfa5d30
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions src/quality-profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,21 @@ export const calculateQualityProfilesDiff = async (
};
});

createQPs.push({
name: value.name,
items: mappedServerQD,
cutoff: qualityToId.get(value.upgrade.until_quality),
cutoffFormatScore: value.upgrade.until_score,
minFormatScore: value.min_format_score,
upgradeAllowed: value.upgrade.allowed,
formatItems: customFormatsMapped,
// required since sonarr 4.0.10 (radarr also)
minUpgradeFormatScore: value.upgrade.min_format_score ?? 1,
...(profileLanguage ? { languageId: profileLanguage.id } : {}), // TODO split out. Not exists for sonarr
});
const newProfile = Object.assign<MergedQualityProfileResource, MergedQualityProfileResource | null | undefined>(
{
name: value.name,
items: mappedServerQD,
cutoff: qualityToId.get(value.upgrade.until_quality),
cutoffFormatScore: value.upgrade.until_score,
minFormatScore: value.min_format_score,
upgradeAllowed: value.upgrade.allowed,
formatItems: customFormatsMapped,
// required since sonarr 4.0.10 (radarr also)
minUpgradeFormatScore: value.upgrade.min_format_score ?? 1,
},
profileLanguage && { language: profileLanguage }, // TODO split out. Not exists for sonarr
);
createQPs.push(newProfile);
continue;
}

Expand Down

0 comments on commit cfa5d30

Please sign in to comment.