Themearr: For developers
How Themearr is built, for anyone who wants to change it or make one like it. It is MIT, by TheMightyTRexUK, and works with plug-in API >=1.14 <2.0.
Its files
starboard-plugin.jsonhelper.py, the helperinstall.pylogo.svgtests/test_app_helpers.pyandtests/test_app_plugins.pytools/make_app_helpers.py, which copieshelper.pyinto the manifest
Containers
| Container | Network | Folders | Runs as | Starts | Limits |
|---|---|---|---|---|---|
main |
default |
data:/helper |
10001:10001 |
always |
64 MB, 0.25 core |
app |
lan |
data:/opt/themearr/data, media/movies |
media |
always |
512 MB, 1 core, 256 processes |
Each image is pinned by digest in the manifest:
main:docker.io/library/python@sha256:c5ba3deef00c7758561a0f03c26f44f10589263d40e732b8748e0d1f38f6dd89, the official Python 3.12 image on Alpineapp:ghcr.io/themearr/themearr@sha256:0a5c617c35f93342f8fc44eb2ce874005f2142315d2c7b4410c709790143448a, Themearr 1.52.1
What Starboard calls
| Path | What it is |
|---|---|
GET /health |
Health: 200 while the helper runs |
GET /card |
The Film theme tunes card (stat) |
GET /sign-in |
The Sign in to Themearr page, only with the plug-in's own key in X-Api-Key |
How it works
- No image of ours. The helper,
helper.py, is Python's standard library only. It is in the manifest'sfilesasapp-1.0.0.py: Starboard writes it once into the helper's own folder before its first start, andcommandruns it in the official Python image. The version in the file name means an update writes the new helper beside the old one.tools/make_app_helpers.pycopies it in, and its check fails when they differ. - Reelix as Radarr. Reelix answers Radarr's API at
<Reelix>/radarr/api/v3. Every 2 minutes the helper reads/run/starboard/reelix.json(permissionreelix:key) and, when Themearr has no Radarr or a different one, saves Reelix's address and key with Themearr'sPOST /api/settings/radarr. Themearr then readsGET /api/v3/movie(each film'sid,title,year,pathandhasFile) and checksGET /api/v3/system/status. Reelix answers both. It does not answerGET /api/v3/mediacover, so Themearr shows no posters. - The films folder. The helper adds
/media/moviesto Themearr's library folders and maps Reelix's/data/media/moviesto it, withPOST /api/settings, then completes Themearr's set-up (POST /api/setup/complete) and starts the first read. - RapidAPI. The key and user name in the plug-in's settings are sent with
POST /api/settings/rapidapi, once each time they change. - The access token is
{secret:auth_token}, made by Starboard for this install and given to both containers asTHEMEARR_AUTH_TOKEN. The helper calls Themearr with it and shows it on the Sign in page. - Media folder.
appruns asmedia, the media folder's owner, so thetheme.mp3files it writes intomedia/moviesare owned like the films. - The helper keeps what it gave as fingerprints in
given.jsonin its folder, so it sends each thing once.
Find out more
This page on GitHub, where the help is written.