recyclarr / recyclarr

Automatically sync TRaSH Guides to your Sonarr and Radarr instances
https://recyclarr.dev
MIT License
1.11k stars 31 forks source link

Sonarr preferred_ratio is not applied #301

Closed bytebone closed 2 months ago

bytebone commented 2 months ago

Is there an existing issue for this?

Current Behavior

The preferred_ratio is defined in recyclarr.yml, but after syncing, the "Preferred" Value in Sonarrs Quality Settings does not change from "Unlimited". Only when The "Preferred" Value is set to anything lower than "Unlimited" does recylcarr adjust the value properly.

The exact same issue applies to Radarr. The steps to reproduce and fix are the same.

Expected Behavior

The "Preferred" value should be set no matter of its current state (unlimited or limited)

Steps To Reproduce

  1. Consider any quality profile managed by recyclarr
  2. set its preferred quality to unlimited
  3. run recyclarr sync sonarr
    • Recyclarr Execution Log:
    • [INF] Processing Quality Definition: series
    • [INF] Using an explicit preferred ratio which will override values from the guide
    • [INF] Number of updated qualities: 0
  4. confirm that the value did not change in sonarr
  5. set the preferred value to an arbitrary but limited number
  6. run recyclarr sync sonarr again
    • Recyclarr Execution Log:
    • [INF] Processing Quality Definition: series
    • [INF] Using an explicit preferred ratio which will override values from the guide
    • [INF] Number of updated qualities: 3
  7. confirm that the value has now been adjusted by recyclarr

Environment & Versions

- Operating System: Unraid Host with Docker
- Architecture: x64
- Recyclarr Version: 6.0.2
- Recyclarr Build: linux-amd64
- Sonarr Version: 4.0.8.1874
- Radarr Version: 5.7.0.8882

Recyclarr Log File(s)

This file is from a run where preferred qualities where set to unlimited and no settings were changed recyclarr_fail.debug.log

After setting the preferred values to a number and re-running, everything was applied, documented by this log recyclarr_success.debug.log

Configuration YAML

sonarr:
  series:
    # Set the URL/API Key to your actual instance
    base_url: https://<webhost>/sonarr
    api_key: 1c5df----------------------3c175

    # Quality definitions from the guide to sync to Sonarr. Choices: series, anime
    quality_definition:
      type: series
      preferred_ratio: 0.4

    custom_formats:
      - trash_ids:
          # Audio
          - b6fbafa7942952a13e17e2b1152b539a # ATMOS (undefined)
          - 63487786a8b01b7f20dd2bc90dd4a477 # DD+
          - 4232a509ce60c4e208d13825b7c06264 # DD+ ATMOS
          - 5964f2a8b3be407d083498e4459d05d0 # DTS
          - 9d00418ba386a083fbf4d58235fc37ef # DTS X
          # ... and so on

Sonarr / Radarr Logs

I checked both Radarr and Sonarr logs and cannot see anything related to failed API queries or other issues in connection with Recyclarr.

bytebone commented 2 months ago

After further reading, this appears to be an exact duplicate of #193. Issue description and solution match. I'm left a little unsure if this is a Recyclarr issue to begin with, or something that would have to be fixed in Son/Radarr upstream.

rcdailey commented 2 months ago

Could you provide the respective verbose log along with the two debug logs you provided? I appreciate the detailed report.

bytebone commented 2 months ago

Since there were too many runs in between my initial report and now due to all the testing, those reports were overwritten. So I've reproduced the issue with Sonarr so I can provide the 4 logs.

recyclarr_success.debug.log recyclarr_success.verbose.log recyclarr_fail.debug.log recyclarr_fail.verbose.log

rcdailey commented 2 months ago

I really can't thank you enough for bringing this to my attention. It took me a while to reproduce this on my side, but I finally determined the issue and have a fix. Let me know if this isn't resolved in the next release!