Movies and Series: Enter adds, a no longer does

The status bar only ever named Enter, while the hint for searching
releases of a title not in the library said (a). Enter is now the one
key for adding, and the hint says Enter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 23:23:34 +02:00
co-authored by Claude Opus 5.5
parent 9b8d59bd48
commit 8775c27aab
6 changed files with 30 additions and 8 deletions
+23
View File
@@ -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()
}