Library: mark titles that are downloading
While the Library is visible it reads the Radarr and Sonarr queues (on opening, every 10 s, and shortly after a grab) and matches them to the titles by movieId / seriesId. Those titles get a blue dot instead of the green or grey one, and their details say how far the download is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-1
@@ -36,6 +36,8 @@ type App struct {
|
||||
theme theme // the colors in use
|
||||
trakt *trakt.Client // trending, most watched and anticipated lists, casts
|
||||
people *peopleCache // casts loaded from Trakt
|
||||
// Called (on the UI goroutine) a moment after a release was grabbed.
|
||||
afterGrab []func()
|
||||
// The Movies and Series views, to refresh their Trakt lists.
|
||||
searches []*searchView
|
||||
themed *themedScreen // draws with them; nil until Run
|
||||
@@ -169,6 +171,7 @@ func New(cfg *config.Config) *App {
|
||||
a.settings = settings
|
||||
calendar := newCalendarView(a, radarrClient, sonarrClient)
|
||||
library := newLibraryView(a, radarrClient, sonarrClient)
|
||||
a.afterGrab = append(a.afterGrab, library.loadQueue)
|
||||
downloads := newDownloadsView(a, sabClient,
|
||||
[]arrSource{
|
||||
{name: "Radarr", queue: radarrClient.Queue, remove: radarrClient.RemoveQueueItem},
|
||||
@@ -187,7 +190,7 @@ func New(cfg *config.Config) *App {
|
||||
a.views = []view{
|
||||
{key: '1', name: "Movies", body: movies.root, onShow: movies.activate, hints: searchHints},
|
||||
{key: '2', name: "Series", body: series.root, onShow: series.activate, hints: searchHints},
|
||||
{key: '3', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints},
|
||||
{key: '3', name: "Library", body: library.root, onShow: library.activate, onHide: library.deactivate, hints: libraryHints},
|
||||
{key: '4', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints},
|
||||
{key: '5', name: "Calendar", body: calendar.root, onShow: calendar.activate, hints: calendarHints},
|
||||
{key: '6', name: "Config", body: settings.root, onShow: settings.activate, hints: settingsHints},
|
||||
|
||||
Reference in New Issue
Block a user