Announce finished and failed downloads in the background (M10)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 22:34:55 +02:00
co-authored by Claude Sonnet 5.5
parent a7765c5079
commit ebbb3cd178
7 changed files with 157 additions and 2 deletions
+8
View File
@@ -32,6 +32,11 @@ type UI struct {
// Posters of titles that are not in the library yet are downloaded from
// the public image hosts Radarr/Sonarr point to (TMDb, TheTVDB).
Covers *bool `json:"covers,omitempty"`
// NotifyDownloads shows a popup (and logs it) when a SABnzbd download
// finishes or fails, whichever view is open (default true).
NotifyDownloads *bool `json:"notify_downloads,omitempty"`
// Bell also rings the terminal bell for those notifications (default false).
Bell bool `json:"bell,omitempty"`
// CoverStyle selects the block characters posters are drawn with:
// "quadrant" (2x2 pixels per cell, every font has the glyphs), "sextant"
// (2x3, sharper, needs a font with the Symbols for Legacy Computing
@@ -40,6 +45,9 @@ type UI struct {
CoverStyle string `json:"cover_style,omitempty"`
}
// ShouldNotifyDownloads reports whether finished downloads are announced.
func (u UI) ShouldNotifyDownloads() bool { return u.NotifyDownloads == nil || *u.NotifyDownloads }
// ShowCovers reports whether poster thumbnails are enabled.
func (u UI) ShowCovers() bool { return u.Covers == nil || *u.Covers }