Skip to content

fix(download-clients): make the Priority dropdown speak the planners' vocabulary - #922

Open
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/900-download-client-priority
Open

fix(download-clients): make the Priority dropdown speak the planners' vocabulary#922
m4bard wants to merge 1 commit into
Listenarrs:canaryfrom
m4bard:fix/900-download-client-priority

Conversation

@m4bard

@m4bard m4bard commented Sep 1, 2026

Copy link
Copy Markdown

Fixes #900.

The Priority select offered Default, Last and First. NzbgetRequestPlanner and SabnzbdAddRequestPlanner switch on force, high, normal and low, with a fallback of zero. The two sets do not intersect, so every choice other than Default fell through to normal and the control did nothing. The one existing backend test for this passes "high", a value the form could never send.

The select now offers Default, Low, Normal, High and Force.

Older Priority is gone

It had no backend reference at all, and the split it came from is Sonarr's recently-aired versus back-catalogue distinction, which has no analogue here. The help text said so out loud: "Priority to use when grabbing episodes that aired within the last 14 days".

One Priority control replaces the pair, bound to the recentPriority key the planners already read, so no stored setting changes meaning.

If you do want two, say so and I will put it back with the second one wired.

The two Legacy checkboxes are gone

Remove Completed (Legacy) and Remove Failed (Legacy) had no backend reference either, and the Completed Download Action dropdown directly above them already covers removing from the client and deleting the files. They were labelled Legacy because that dropdown replaced them.

One more thing while I was in there

SABnzbd's BuildFileQueryParams always set priority, including for Default, where it sent 0. That overrides whatever priority the SABnzbd category carries, which is not what Default asks for. BuildQueryParams above it already skipped the parameter; the path AddAsync actually uses did not. It does now.

The Priority section is gated on usenet, since only the usenet planners read it.

Tests

The form test and DownloadClientPriorityTests pin the same five strings from both ends, which is the check that was missing. A backend test alone could not have caught this, because the backend was always correct about the vocabulary it accepted.

Confirmed by putting Last and First back, which fails the form test, and by making the SABnzbd path send a priority unconditionally again, which fails the Default case.


Worked through with Claude Code at my direction. The claims above were checked by running them rather than by reading, and I reviewed this before posting.

… vocabulary

The Priority select offered Default, Last and First. NzbgetRequestPlanner and
SabnzbdAddRequestPlanner switch on force, high, normal and low, with a fallback
of zero. The two sets do not intersect, so every choice other than Default fell
through to normal and the control did nothing. The one existing backend test for
this passes "high", a value the form could never send.

The select now offers Default, Low, Normal, High and Force.

Older Priority is gone. It had no backend reference at all, and the split it came
from is Sonarr's recently-aired versus back-catalogue distinction, which has no
analogue here. The help text said so out loud: "episodes that aired within the
last 14 days". One Priority control replaces the pair, bound to the recentPriority
key the planners already read, so no stored setting changes meaning. If you do
want two, say so and I will put it back with the second one wired.

Remove Completed (Legacy) and Remove Failed (Legacy) are gone too. Neither had any
backend reference, and the Completed Download Action dropdown directly above them
already covers removing from the client and deleting the files. They were labelled
Legacy because that dropdown replaced them.

Also, SABnzbd's BuildFileQueryParams always set priority, including for Default,
where it sent 0. That overrides whatever the SABnzbd category carries, which is
not what Default asks for. BuildQueryParams above it already skipped the parameter;
the path AddAsync actually uses did not. It does now.

The Priority section is gated on usenet, since only the usenet planners read it.

The form test and DownloadClientPriorityTests pin the same five strings from both
ends, which is the check that was missing. Confirmed by putting Last and First
back, which fails the form test, and by making the SABnzbd path send a priority
unconditionally again, which fails the Default case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YEVQ7qDJLk5196MFeggWuA
@m4bard
m4bard requested a review from a team September 1, 2026 03:04
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.

Recent Priority resolves to normal for every non-default value, and three more download-client controls have no reader

1 participant