Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality/language/release profile and quality definition parser fixes #23

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

Callum027
Copy link
Member

@Callum027 Callum027 commented Feb 19, 2023

Implement additional validation of quality, language, release profile and quality definitions to ensure proper error checking and consistent value parsing. Also fix a number of small bugs.

  • Refactor the quality profile root validator to be easier to understand, and include setting upgrade_until to None if upgrades_allowed is False to ensure Buildarr ignores the remote value when upgrades are disabled
  • Refactor the quality profile remote map entries to be easier to understand
  • Sonarr requires a valid value for upgrade_until even if upgrading is disabled, so fix upgrade_until encoding when set to None by sending the value of the highest enabled quality instead (this fix applies to both quality and language profiles)
  • Add the same checks that are used in quality profiles into the language profile parser:
    • upgrade_until is required if upgrades are enabled
    • Set upgrade_until to None if upgrades are disabled
    • Reject duplicate language declarations
  • Enable validation of in-place assignments on release profiles and quality definitions, to ensure the values loaded from TRaSH-Guides profiles are valid, but also allow processing validators (e.g. sorting on release profiles) to run
  • Simplify release profile preferred word sorting function
  • Fix incorrect syntax in language profile definition examples in documentation

@Callum027 Callum027 added bug Something isn't working enhancement New feature or request testing Testing-related issue or pull request labels Feb 19, 2023
@Callum027 Callum027 added this to the v0.1.2 milestone Feb 19, 2023
@Callum027 Callum027 self-assigned this Feb 19, 2023
@Callum027 Callum027 merged commit d83a5d2 into main Feb 19, 2023
@Callum027 Callum027 deleted the 2-sonarr-settings-profiles branch February 19, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request testing Testing-related issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant