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

Unable to Configure MinUpgradeFormatScore in sonarr_quality_profile Module #86

Open
gsymeoni opened this issue Jan 9, 2025 · 4 comments

Comments

@gsymeoni
Copy link

gsymeoni commented Jan 9, 2025

Issue Description:

The Sonarr API for creating a quality profile differentiates between two fields:

  • MinFormatScore
  • MinUpgradeFormatScore

The module devopsarr.sonarr.sonarr_quality_profile exposes a parameter min_format_score, which maps to the Sonarr API's MinFormatScore. However, the API's MinUpgradeFormatScore field is not exposed by the module, and defaults to 0, which is not a valid value according to the Sonarr API validation. This leads to errors when creating a quality profile.

"'Min Upgrade Format Score' must be greater than or equal to '1'."

Steps to Reproduce

  1. Use the sonarr_quality_profile module:

    - name: Create Quality Profile
      devopsarr.sonarr.sonarr_quality_profile:
        sonarr_url: "http://your-sonarr-url"
        sonarr_api_key: "your-api-key"
        name: "Example Profile"
        min_format_score: 5
        # other required parameters...
  2. Attempt to create the quality profile.

  3. Observe the error about MinUpgradeFormatScore needing to be at least 1

Environment

  • Ansible: 2.17.7
  • Sonarr: 4.0.12.2823
  • Collection: 1.2.0
  • Sonarr-py: 1.0.2
@gsymeoni
Copy link
Author

Worth mentioning that MinUpgradeFormatScore maps to the "Custom Format Score Increment" option in Sonarr quality profile menu

@Fuochi
Copy link
Collaborator

Fuochi commented Jan 19, 2025

Hi @gsymeoni, sorry for my late reply. The issue is already highlighted in #85's tests. It's related to an API change on Sonarr's side. I'll have to merge devopsarr/sonarr-py#77, then I can add the new field.
I'll try to find time to do that soon

@gsymeoni
Copy link
Author

Hi @Fuochi thank you for your reply and for working on the update! I appreciate your help

@Fuochi
Copy link
Collaborator

Fuochi commented Jan 24, 2025

Hi @gsymeoni, could you please try version 1.3.0? be aware that you should also update sonarr-py to 1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants