Skip to content

Add debrid provider priority#294

Open
ALenfant wants to merge 1 commit into
sirrobot01:betafrom
ALenfant:antonin/debrid-priority
Open

Add debrid provider priority#294
ALenfant wants to merge 1 commit into
sirrobot01:betafrom
ALenfant:antonin/debrid-priority

Conversation

@ALenfant
Copy link
Copy Markdown

📌 Description

Specify a priority value for configured Debrid services.

They are then tried in order of increasing priority (1, 2, ...)

Fixes #285, although I decided to let the user specify the priority order by a new field, as re-ordering configured debrid services was a bit trickier


Target Branch Check (IMPORTANT)

  • I confirm this PR is targeting the correct branch

Expected target:

  • beta (for features)

Changes Made

  • Backend Configuration: Added priority field to the Debrid struct in internal/config/debrid.go.
  • Logic Implementation: Updated FilterDebrid in pkg/manager/debrid.go to sort clients by priority (lower values first), using the provider name as a secondary sort key for consistent ordering.
  • Web UI: Added a Priority input field to the Debrid configuration section in pkg/server/assets/js/config.js, enabling users to manage priorities via the dashboard.
  • Documentation: Updated the configuration guide in docs/src/content/docs/guides/configuration.md to document the new priority field.

Testing

  • Tested locally

Steps:

  1. Added multiple debrid providers with a specific priority (ServiceA then ServiceB)
  2. Attempted to download a test torrent known to fail on ServiceA but work on ServiceB
  3. Decypharr first tried ServiceA, then fell back on ServiceB as expected
  4. Reversed the priority order, ServiceB was used first as expected

Risks / Notes

  • Default priority is 0. Providers with equal priority are sorted alphabetically by their configured name.
  • Non-breaking change: existing configurations will default to 0 and continue to function as before.

Screenshots (if applicable)

Screenshot 2026-05-17 at 13 13 37

Checklist

  • Code builds successfully
  • No console/log errors
  • Reviewed my own code
  • Target branch is correct

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

Successfully merging this pull request may close these issues.

1 participant