Show Radarr and Sonarr queues in the Downloads view (M5)
Add queue listing and removal/blocklisting to the shared arr client. The Downloads view now fetches SABnzbd and both arr queues in parallel, shows status, progress and import problems, flags items needing attention in the summary, and supports removing or blocklisting items. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -136,3 +136,22 @@ func TestTruncate(t *testing.T) {
|
||||
t.Errorf("rune handling: %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestArrStatusText(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
item arr.QueueItem
|
||||
want string
|
||||
}{
|
||||
{"downloading", arr.QueueItem{TrackedDownloadState: "downloading", TrackedDownloadStatus: "ok"}, "Downloading"},
|
||||
{"blocked", arr.QueueItem{TrackedDownloadState: "importBlocked", TrackedDownloadStatus: "warning"}, "[red]Import blocked[-]"},
|
||||
{"warning", arr.QueueItem{TrackedDownloadState: "importPending", TrackedDownloadStatus: "warning"}, "[yellow]Import pending[-]"},
|
||||
{"error", arr.QueueItem{Status: "failed", TrackedDownloadStatus: "error"}, "[red]Failed[-]"},
|
||||
{"fallback to status", arr.QueueItem{Status: "queued"}, "Queued"},
|
||||
}
|
||||
for _, tc := range tests {
|
||||
if got := arrStatusText(tc.item); got != tc.want {
|
||||
t.Errorf("%s: got %q, want %q", tc.name, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user