Swap the Library and Downloads views (F3 Library, F4 Downloads)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 21:44:05 +02:00
co-authored by Claude Sonnet 5.5
parent 77c25b2c92
commit ff204655d3
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ Keep the file private (`chmod 600`); it holds your API keys.
| Key | Action | | Key | Action |
|---|---| |---|---|
| `F1`–`F4` | switch view | | `F1`–`F5` | switch view (Movies, Series, Library, Downloads, Log) |
| `Tab`, `Shift+Tab` | switch panel within a view | | `Tab`, `Shift+Tab` | switch panel within a view |
| `?` / `F9` | help | | `?` / `F9` | help |
| `/` | focus search box | | `/` | focus search box |
+2 -2
View File
@@ -83,7 +83,7 @@ Layout sketch (Library view; the other views follow the same frame):
``` ```
┌ arr-tui ───────────────────────────────────────────────────────────┐ ┌ arr-tui ───────────────────────────────────────────────────────────┐
│ 1 Movies 2 Series 3 Downloads 4 Library 5 Log ● Radarr ● Sonarr ● SAB │ ← tab bar + connection state │ 1 Movies 2 Series 3 Library 4 Downloads 5 Log ● Radarr ● Sonarr ● SAB │ ← tab bar + connection state
│ Library · Movies 12/40 · Series 5/9 · filter: missing │ │ Library · Movies 12/40 · Series 5/9 · filter: missing │
│ Filter: ______________________ │ │ Filter: ______________________ │
├─ Movies ───────────────────────┬─ Details ─────────────────────────┤ ├─ Movies ───────────────────────┬─ Details ─────────────────────────┤
@@ -105,7 +105,7 @@ Keybindings (the status bar shows the ones that apply to the current view):
| Key | Action | | Key | Action |
|---|---| |---|---|
| `F1-F5` | Switch view (Movies, Series, Downloads, Library, Log); also while typing, and from full-screen views. Dialogs block them. | | `F1-F5` | Switch view (Movies, Series, Library, Downloads, Log); also while typing, and from full-screen views. Dialogs block them. |
| `Tab` / `Shift+Tab` | Switch panel within the current view (never the view): search box / results, Downloads panels, Library lists | | `Tab` / `Shift+Tab` | Switch panel within the current view (never the view): search box / results, Downloads panels, Library lists |
| `?` / `F9` | Help (`F9` also works while typing) | | `?` / `F9` | Help (`F9` also works while typing) |
| `q` / `Ctrl+C` | Quit | | `q` / `Ctrl+C` | Quit |
+3 -3
View File
@@ -111,8 +111,8 @@ func New(cfg *config.Config) *App {
a.views = []view{ a.views = []view{
{key: '1', name: "Movies", body: newSearchView(a, radarrBackend{radarrClient}, cfg.Radarr).root, hints: searchHints}, {key: '1', name: "Movies", body: newSearchView(a, radarrBackend{radarrClient}, cfg.Radarr).root, hints: searchHints},
{key: '2', name: "Series", body: newSearchView(a, sonarrBackend{sonarrClient}, cfg.Sonarr).root, hints: searchHints}, {key: '2', name: "Series", body: newSearchView(a, sonarrBackend{sonarrClient}, cfg.Sonarr).root, hints: searchHints},
{key: '3', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints}, {key: '3', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints},
{key: '4', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints}, {key: '4', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints},
{key: '5', name: "Log", body: a.logs.root, onShow: a.logs.onShow, hints: logHints}, {key: '5', name: "Log", body: a.logs.root, onShow: a.logs.onShow, hints: logHints},
} }
for i, v := range a.views { for i, v := range a.views {
@@ -356,7 +356,7 @@ func (a *App) handleKey(ev *tcell.EventKey) *tcell.EventKey {
return ev return ev
} }
// viewShortcut returns the view index for F1-F4, or -1. // viewShortcut returns the view index for F1-F5, or -1.
func (a *App) viewShortcut(ev *tcell.EventKey) int { func (a *App) viewShortcut(ev *tcell.EventKey) int {
if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 { if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 {
return int(ev.Key() - tcell.KeyF1) return int(ev.Key() - tcell.KeyF1)