Files
arr-tui/webos/README.md
T
nilsandClaude Opus 5.5 0dedcb3893 Nix flake with a dev shell for everything
nix develop: Go, gopls, shellcheck, make, curl, jq, Python, Node.js,
oxipng and ImageMagick; on Linux also Ghostty, Xvfb, xdotool, DejaVu fonts
and Chromium for the README screenshots and the webOS app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:16:05 +01:00

93 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# arr-tui for LG webOS TVs
The same views as the terminal app, as a TV app driven by the remote:
- **Movies** and **Series**: search Radarr / Sonarr. With an empty search box you get the Trakt lists
(trending, most watched this week, anticipated, popular, US box office). Add a title, or open
releases and other actions for library titles.
- **Library**: movies and series, each with its own status, title and file-property filters
(quality, language, codec, HDR, audio). A blue dot marks titles that are downloading. A series
opens its seasons and episodes.
- **Downloads**: the SABnzbd queue and history and the Radarr / Sonarr queues. Pause / resume,
delete, retry, remove and blocklist.
- **Calendar**: two weeks of movie releases and airing episodes.
- **Settings** and **Log**.
- **Release search** with approval and rejection reasons, sort, filters and grab.
- **Details pane** with poster, plot and cast from Trakt.
It is a plain web app (TypeScript, no framework) that talks to Radarr, Sonarr, SABnzbd and Trakt
directly: all four answer cross-origin requests, so the TV needs nothing else running.
## The remote
| Button | Does |
|---|---|
| ◀ ▶ ▲ ▼ | move; in a list ▲ ▼ move the selection, at its ends they leave it |
| OK | press; on a title, the menu of what can be done with it |
| Back | close a dialog or page; in a view, back to its tab; on the tabs, leave the app |
| 1–7 | open a view |
| CH ▲ / ▼ | page through a list |
| Red / Green | previous / next Trakt list or calendar week; Library: movies ⇄ series |
| Yellow | filter by file properties (Library); pause / resume SABnzbd (Downloads) |
| Blue | reload |
The footer shows what OK and the colour buttons do in the current view. With the Magic Remote's
pointer, hovering focuses and clicking presses. In a desktop browser, F1–F4 stand in for the
colour buttons and Escape for Back.
## Configuration
The build bakes your arr-tui config into the app: `$ARR_TUI_CONFIG`, else
`~/.config/arr-tui/config.json` (or `node build.mjs --config FILE`). On the TV, **Settings**
changes the addresses, keys, defaults, Trakt client ID and theme. Those changes are kept on the TV
until "Reset to built-in".
The package then holds your API keys. Keep it private and never publish it.
Addresses must not redirect. The terminal app follows a redirect from `http://` to `https://`; a
browser does not for cross-origin requests, so enter the final (usually `https://`) address.
## Install on the TV (Developer Mode)
1. On the TV, install **Developer Mode** from the LG Content Store and sign in with an LG
developer account (free, [webostv.developer.lge.com](https://webostv.developer.lge.com)). Turn
on **Dev Mode Status** and **Key Server**, and note the IP address and the passphrase.
2. Once, on the computer (Node.js 22 or newer):
```sh
cd webos
npm install
npx ares-setup-device -a tv -i "host=TV_IP" -i "port=9922" -i "username=prisoner"
npx ares-novacom --device tv --getkey # asks for the passphrase
```
3. Build, package, install and start:
```sh
npm run package # dist/ and out/com.stinnesbeck.arrtui_<version>_all.ipk
npm run install-tv
npm run launch
```
A Developer Mode session lasts 50 hours; the Developer Mode app extends it, otherwise the TV removes
developer apps. On a rooted TV with the Homebrew Channel the `.ipk` can be installed without that
limit.
The app targets webOS 5 (2020 TVs, Chromium 68) and newer.
## Development
`nix develop` in the repository has Node.js and Chromium (and sets `$CHROMIUM`).
```sh
npm run typecheck
npm test # unit tests (Node's test runner)
npm run demo # dist/ with the fake services of dev/screenshots
python3 ../dev/screenshots/server.py & # the fake Radarr, Sonarr, SABnzbd and Trakt
CHROMIUM=$(command -v chromium) node dev/drive.mjs SCENE OUTDIR
```
`dev/drive.mjs` opens `dist/index.html` in Chromium at 1920×1080, presses remote buttons from a
scene file (`key Down Enter Red`, `type text`, `sleep 1`, `shot name`, `log`) and takes screenshots.
The page can also be opened in any desktop browser (`dist/index.html`).