Keep posters and casts between runs

Posters (the downloaded bytes, per size, 30 days, at most 200 MB) and
casts (people.json, 7 days, at most 2000) are stored in the user's cache
directory (os.UserCacheDir()/arr-tui) and used on the next start before
asking the servers. Expired posters are pruned at startup, casts are
written shortly after new ones arrive and on exit. Tests turn the cache
off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 10:35:02 +02:00
co-authored by Claude Opus 5.5
parent 4eace6849e
commit 1056846a48
10 changed files with 381 additions and 13 deletions
+3
View File
@@ -14,6 +14,9 @@ A terminal UI to search for movies and series with [Radarr](https://radarr.video
ticked, the others can be added right there (Enter). Needs a free Trakt client ID (see Configure).
- **Library**: movies and series with their status; the dot before a title turns blue while it
is downloading, and the details say how far.
- **Cache**: posters (30 days, at most 200 MB) and casts (7 days) are kept between runs in
`~/.cache/arr-tui` (`$XDG_CACHE_HOME`; `~/Library/Caches/arr-tui` on macOS), so they show at
once after a restart. Deleting the folder is always safe.
- **Season posters**: in a series' seasons and episodes, the poster follows the selected season.
- **Cast**: with a Trakt client ID, the details pane also lists the director (or the creators of a
series) and the cast with their roles, below the plot, in every view.