95 lines
4.1 KiB
Go
95 lines
4.1 KiB
Go
package ui
|
|
|
|
import (
|
|
"github.com/gdamore/tcell/v2"
|
|
"github.com/rivo/tview"
|
|
)
|
|
|
|
const helpText = `[yellow]Global[-]
|
|
F1-F7 switch view (also from the release and episode lists)
|
|
Tab, Shift+Tab switch panel within a view
|
|
?, F9 this help (F9 works while typing)
|
|
q, Ctrl+C quit
|
|
Esc close dialog / go back
|
|
|
|
[yellow]Movies and Series[-]
|
|
/ focus the search box
|
|
Enter, a add the selected title (dialog: ↑↓ move, ←→ change a
|
|
dropdown, Space toggles, Enter/Space opens a list)
|
|
i interactive release search (library titles)
|
|
|
|
[yellow]Library[-]
|
|
Tab switch between the movies and series lists
|
|
f cycle filter (all, missing, downloaded, monitored, unmonitored);
|
|
every list has its own filters
|
|
F filter by file properties: quality, codec (x265, x264, AV1),
|
|
HDR / DV / SDR, audio (Atmos, TrueHD, DTS, DD+ ...), language.
|
|
Changes apply live behind the dialog, also while you move through an
|
|
open list; Esc undoes them. Options that would leave no
|
|
results are not offered.
|
|
Series are read on demand.
|
|
/ text filter for the focused list only; each list keeps its
|
|
own text (Enter or Esc returns to the list)
|
|
t toggle monitored
|
|
d remove from the library (files are kept unless you tick
|
|
"Delete files")
|
|
s automatic search (series: all missing, asks first)
|
|
i, Enter movie: release search; series: seasons and episodes
|
|
r reload
|
|
|
|
[yellow]Calendar (F5)[-]
|
|
[ ] move the two-week window back / forward by a week
|
|
t back to today
|
|
u include unmonitored items
|
|
Enter, i release search for the selected movie / episode
|
|
s automatic search r reload
|
|
|
|
[yellow]Seasons and episodes[-]
|
|
Enter season: expand/collapse; episode: release search
|
|
i, s, t release search, automatic search, toggle monitored
|
|
(on a season they apply to the whole season)
|
|
|
|
[yellow]Release list[-]
|
|
Enter, g grab the selected release
|
|
s cycle sort (best, size, age)
|
|
f hide rejected releases
|
|
F filter by quality, codec, HDR / DV, audio, language (read from
|
|
the release title, quality and custom formats)
|
|
|
|
[yellow]Downloads[-]
|
|
p pause / resume the SABnzbd queue
|
|
d delete the selected job or entry
|
|
b remove from arr queue + blocklist
|
|
t retry a failed download (history)
|
|
r refresh now
|
|
|
|
[yellow]Log (F6)[-]
|
|
Popups fade away by themselves; everything they said is kept here.
|
|
↑↓, PgUp/PgDn scroll G follow new entries c clear
|
|
|
|
[yellow]Config (F7)[-]
|
|
Edit the settings of the config file: service addresses and API keys, add-form
|
|
defaults, refresh interval, posters, notifications.
|
|
↑↓ move, Tab next section, Space toggles, Enter presses a button
|
|
Test connections checks the three services with the values typed in
|
|
Save writes the file and applies everything at once; Revert discards edits
|
|
Letters such as q and ? are typed here; F9 opens this help
|
|
|
|
[yellow]Connections[-]
|
|
`
|
|
|
|
// showHelp opens the key reference together with the connection state.
|
|
func (a *App) showHelp() {
|
|
tv := tview.NewTextView().SetDynamicColors(true).SetScrollable(true)
|
|
tv.SetBorder(true).SetTitle(" Help — Esc to close ")
|
|
tv.SetText(helpText + a.serviceSummary())
|
|
tv.SetInputCapture(func(ev *tcell.EventKey) *tcell.EventKey {
|
|
if ev.Key() == tcell.KeyEsc || (ev.Key() == tcell.KeyRune && (ev.Rune() == 'q' || ev.Rune() == '?')) {
|
|
a.closeModal()
|
|
return nil
|
|
}
|
|
return ev
|
|
})
|
|
a.openModal(tv, 80, 40)
|
|
}
|