Add library view and series drill-down (M8)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 19:31:12 +02:00
co-authored by Claude Sonnet 5.5
parent a469eca871
commit 61373bbe45
11 changed files with 1080 additions and 18 deletions
+2 -5
View File
@@ -69,6 +69,7 @@ func New(cfg *config.Config) *App {
radarrClient := radarr.NewClient(cfg.Radarr.URL, cfg.Radarr.APIKey)
sonarrClient := sonarr.NewClient(cfg.Sonarr.URL, cfg.Sonarr.APIKey)
library := newLibraryView(a, radarrClient, sonarrClient)
downloads := newDownloadsView(a, sabnzbd.NewClient(cfg.SABnzbd.URL, cfg.SABnzbd.APIKey),
[]arrSource{
{name: "Radarr", queue: radarrClient.Queue, remove: radarrClient.RemoveQueueItem},
@@ -79,7 +80,7 @@ func New(cfg *config.Config) *App {
{key: '1', name: "Movies", body: newSearchView(a, radarrBackend{radarrClient}, cfg.Radarr).root},
{key: '2', name: "Series", body: newSearchView(a, sonarrBackend{sonarrClient}, cfg.Sonarr).root},
{key: '3', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate},
{key: '4', name: "Library", body: placeholder("Library (v0.2)")},
{key: '4', name: "Library", body: library.root, onShow: library.activate},
}
for i, v := range a.views {
a.pages.AddPage(v.name, v.body, true, i == 0)
@@ -306,7 +307,3 @@ func (a *App) renderTabs() {
}
a.tabs.SetText(s)
}
func placeholder(text string) tview.Primitive {
return tview.NewTextView().SetText(text).SetTextAlign(tview.AlignCenter)
}