diff --git a/CHANGELOG.md b/CHANGELOG.md index fa64570..8bb9db7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- **Enter adds** a title in Movies and Series; `a` no longer does (the status bar only ever named + Enter, and the hint for searching releases of a title not in the library now says Enter too). - **Trending, most watched and anticipated** movies and series from Trakt: with an empty search box, Movies and Series show trending now, most watched this week, anticipated, popular and (movies) the US box office, each title with its number ("1.2k watching", "on 18k lists", "$48M last diff --git a/README.md b/README.md index 23a081f..88b1eae 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A terminal UI to search for movies and series with [Radarr](https://radarr.video - **Trending, most watched, anticipated**: while the search box is empty, Movies and Series show lists from [Trakt](https://trakt.tv): trending now, most watched this week, anticipated, popular, and the US box office for movies. `[` and `]` switch lists; titles already in your library are - ticked, the others can be added right there. Needs a free Trakt client ID (see Configure). + ticked, the others can be added right there (Enter). Needs a free Trakt client ID (see Configure). - **Interactive search**: list the releases Radarr/Sonarr find (approved or rejected, with reasons), sort and filter them (by approval, quality, x265 / x264 / AV1, HDR, Dolby Vision, audio format, language), and grab one. Series: pick a season or a single episode first. - **Posters**: the detail panes show the poster at the top right; title, facts, path and plot @@ -112,7 +112,7 @@ Keep the file private (`chmod 600`); it holds your API keys. | `F9` | help | | `/` | focus search box | | `[`, `]`, `r` (Movies / Series, empty search) | previous / next Trakt list, reload it | -| `Enter`, `a` | add selected title | +| `Enter` | add selected title | | `i` | interactive release search | | `Tab`, `f`, `F`, `/`, `t`, `s`, `d`, `i`/`Enter`, `r` (library) | movies/series list, status filter, file-property filter, text filter, monitor, search, remove, releases/episodes, reload | | `[`, `]`, `t`, `u`, `Enter`, `s` (calendar) | week back / forward, today, unmonitored, releases, search | diff --git a/SPECS.md b/SPECS.md index bdf983d..19518f3 100644 --- a/SPECS.md +++ b/SPECS.md @@ -118,7 +118,7 @@ Keybindings (the status bar shows the ones that apply to the current view): | `Ctrl+C` | Quit (there is no single-letter quit key, so typing never quits by accident) | | `Esc` | Close a dialog or a full-screen view | | `/` | Movies, Series, Library: focus the search / text filter | -| `Enter` / `a` | Movies, Series: add the selected result (dialog: ↑↓ move, ←→ change dropdowns) | +| `Enter` | Movies, Series: add the selected result (dialog: ↑↓ move, ←→ change dropdowns) | | `i` | Movies, Series, Library: interactive release search (series: seasons and episodes) | | `F` | Library and release list: filter by properties (quality, codec, HDR/DV, audio, language) | | `f` | Library: cycle the status filter; release list: hide rejected releases | diff --git a/internal/ui/discover_test.go b/internal/ui/discover_test.go index 1e53c7a..0c9efaf 100644 --- a/internal/ui/discover_test.go +++ b/internal/ui/discover_test.go @@ -128,3 +128,26 @@ func TestListNumbersAreRightAligned(t *testing.T) { t.Errorf("after resize: numbers end in columns %v", e) } } + +func TestEnterAddsAndAIsAnOrdinaryKey(t *testing.T) { + a := newTestApp(t) + v := a.searches[0] + v.setResults([]result{movieResult{Movie: radarr.Movie{Title: "Dune", Year: 2021, TMDBID: 1}}}) + // a is no longer a key of the list: it goes on to the list (which ignores it). + if got := v.list.GetInputCapture()(tcell.NewEventKey(tcell.KeyRune, 'a', 0)); got == nil { + t.Error("a is still taken by the list") + } + // The hint for releases of a title not in the library names Enter. + v.interactive(0) + if msg := plainText(a.status.GetText(false)) + toastText(a); !strings.Contains(msg, "first (Enter)") { + t.Errorf("hint: %q", msg) + } +} + +func toastText(a *App) string { + var b strings.Builder + for _, t := range a.toasts { + b.WriteString(t.text) + } + return b.String() +} diff --git a/internal/ui/help.go b/internal/ui/help.go index 4da165e..018f9d4 100644 --- a/internal/ui/help.go +++ b/internal/ui/help.go @@ -27,7 +27,7 @@ var helpSections = []helpSection{ }}, {title: "Movies and Series", items: []helpItem{ {"/", "focus the search box"}, - {"Enter, a", "add the selected title (dialog: ↑↓ move, ←→ change a dropdown, Space toggles, Enter/Space opens a list)"}, + {"Enter", "add the selected title (dialog: ↑↓ move, ←→ change a dropdown, Space toggles, Enter/Space opens a list)"}, {"i", "interactive release search (library titles)"}, {"[ ]", "with an empty search box: previous / next Trakt list (trending now, most watched this week, anticipated, popular; movies also the US box office); needs a Trakt client ID (Config view)"}, {"r", "reload the Trakt list"}, diff --git a/internal/ui/search.go b/internal/ui/search.go index a16e6f4..59c9042 100644 --- a/internal/ui/search.go +++ b/internal/ui/search.go @@ -125,9 +125,6 @@ func newSearchView(app *App, be backend) *searchView { v.reloadList() return nil } - case 'a': - v.add(v.list.GetCurrentItem()) - return nil case 'i': v.interactive(v.list.GetCurrentItem()) return nil @@ -347,7 +344,7 @@ func (v *searchView) interactive(i int) { } r := v.results[i] if !r.inLibrary() { - v.app.SetMessage(fmt.Sprintf("[yellow]Add %s to %s first (a), then search for releases", tview.Escape(r.title()), v.be.name())) + v.app.SetMessage(fmt.Sprintf("[yellow]Add %s to %s first (Enter), then search for releases", tview.Escape(r.title()), v.be.name())) return } v.be.interactive(v, r)