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:
@@ -194,3 +194,32 @@ func truncate(s string, n int) string {
|
||||
}
|
||||
return string(r[:n-1]) + "…"
|
||||
}
|
||||
|
||||
// arrStatusText renders the state of a Radarr/Sonarr queue item, colored by severity.
|
||||
func arrStatusText(it arr.QueueItem) string {
|
||||
label := map[string]string{
|
||||
"downloading": "Downloading",
|
||||
"importPending": "Import pending",
|
||||
"importBlocked": "Import blocked",
|
||||
"importing": "Importing",
|
||||
"imported": "Imported",
|
||||
"failedPending": "Failed (pending)",
|
||||
"failed": "Failed",
|
||||
"ignored": "Ignored",
|
||||
}[it.TrackedDownloadState]
|
||||
if label == "" {
|
||||
label = it.Status
|
||||
if label != "" {
|
||||
label = strings.ToUpper(label[:1]) + label[1:]
|
||||
}
|
||||
}
|
||||
label = tview.Escape(label)
|
||||
switch {
|
||||
case it.TrackedDownloadStatus == "error" || it.TrackedDownloadState == "failed" ||
|
||||
it.TrackedDownloadState == "failedPending" || it.TrackedDownloadState == "importBlocked":
|
||||
return "[red]" + label + "[-]"
|
||||
case it.TrackedDownloadStatus == "warning":
|
||||
return "[yellow]" + label + "[-]"
|
||||
}
|
||||
return label
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user