Files
arr-tui/webos/README.md
T
nilsandClaude Opus 5.5 7f6d4d07b9 webOS: a TV app with the views of arr-tui
A TypeScript web app for LG webOS TVs (webOS 5 / Chromium 68 and newer),
driven by the remote: Movies and Series search with the Trakt lists,
Library with status, title and file-property filters and download marks,
seasons and episodes, release search and grab, Downloads, Calendar,
Settings and Log. It talks to Radarr, Sonarr, SABnzbd and Trakt directly
(they answer cross-origin requests); the arr-tui config is baked in at
build time and can be changed on the TV.

dev/screenshots/server.py answers cross-origin requests and accepts writes
for it; webos/dev/drive.mjs drives the app in Chromium for screenshots.

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

4.0 KiB
Raw Blame History

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). 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):

    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:

    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

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).