JellyFinPoster/SPEC
JellyFinPoster — Product specification
The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree.
docs/RELEASE.mdsays which part of this the current milestone delivers.
1. Product definition
Place in the ecosystem: A product (App) in docs/ECOSYSTEM.md §2.2: the poster collages on the owner's Jellyfin library tiles. JellyFinPoster is a small Python script for the owner's own Jellyfin server. Once a day, run by MindAttic.Scheduler, it rebuilds the Movies, TV Shows, Books and Music library tiles as poster collages made from the server's own artwork and uploads each as the library's Primary image. The finished product refreshes all four tiles unattended, picks the right library even when two share a type, has exactly one runner (the Scheduler job), ships the way every MindAttic tool ships, and is documented as it is.
2. Scope boundary
2.1 In the product
- Collage composition from Jellyfin item artwork for the four library types.
- Library lookup, item sampling, poster validation and de-duplication, upload over the Jellyfin HTTP API.
- Settings and the
jellyfinkey from MindAttic Vault, with a one-time.envimport. - Unattended runs from MindAttic.Scheduler with honest exit codes; one-click setup.
2.2 Never in the product
- A Jellyfin plugin — it talks to the server from outside over the HTTP API (BIBLE §3).
- Layouts, themes or per-library styling — one fixed layout by design; it is not a poster designer (BIBLE §3).
- Artwork from outside Jellyfin (TMDB and similar) — the server is the one source (JFP-LAW-4; replaced in aa139e7).
- Changing item metadata or artwork — it reads item images and never writes them (BIBLE §3).
- Its own scheduling, or Linux/macOS scheduling — it runs once and exits; MindAttic.Scheduler repeats it.
- Open-ended loops — whole-suite reruns, repo-wide clean-ups, exhaustive bughunts, LF conversion (JFP-T4, JFP-T5, JFP-T9, JFP-T30, wont-do).
3. Users and roles
- The owner — wants fresh library tiles in every Jellyfin client without doing anything.
- MindAttic.Scheduler — runs
JellyFinPoster.Refreshnightly and retries on a nonzero exit. - MindAttic Vault — holds the server URL, library names and the shared
jellyfinkey.
4. Requirements
Status is built (closed ticket, with evidence) or MS-35, the milestone in §7 that delivers it.
E1. Library tile refresh — JFP-T40 — built
F1.1 Collage from Jellyfin artwork — JFP-T41 — built
- S1.1.1 Four library tiles redrawn — JFP-T42 — built As the owner, I want the Movies, TV Shows, Books and Music tiles rebuilt as poster collages on every run, so that every Jellyfin client shows fresh tiles. Acceptance: Given the four libraries exist, when the script runs, then each library's Primary image is replaced. Evidence:
jellyfin_poster.pyrun(); 9195d40. - S1.1.2 Whole-library sampling — JFP-T43 — built As the owner, I want Movies and TV sampled at random from the whole library and Books and Music from recent additions, so that the tiles show the breadth of the collection. Acceptance: Given a large library, when two runs happen, then their collages draw different posters. Evidence: 0fa8d09 (JFP-T24).
- S1.1.3 Clean grids only — JFP-T44 — built As the owner, I want duplicate posters dropped by content hash, near-blank images rejected and a library with fewer than 3 usable posters left alone, so that a tile is never broken. Acceptance: Given fewer than 3 usable posters, when the run reaches that library, then its current image stays. Evidence: 8764a42; JFP-LAW-1.
- S1.1.4 Labelled, rounded tiles — JFP-T45 — built As the owner, I want each collage to carry the library name in Noto Sans Bold on a translucent banner with rounded corners, so that tiles read clearly. Acceptance: Given a long library label, when the collage is drawn, then the label fits and the corners are round. Evidence: e844b6a, 923a0af, f4d0312 (JFP-T12).
- S1.1.5 Upload as the Primary image — JFP-T46 — built As the owner, I want the finished JPEG uploaded as the library's Primary image over the Jellyfin API, so that no plugin is needed. Acceptance: Given a collage, when it is uploaded, then the server answers success and clients show it. Evidence:
upload_library_image(); aa139e7.
E2. Unattended operation — JFP-T47 — built
F2.1 Runs unattended — JFP-T48 — built
- S2.1.1 Fails loudly to the scheduler — JFP-T49 — built As the owner, I want any lookup, fetch or upload failure to end the run nonzero, so that the scheduled retries fire. Acceptance: Given the server is unreachable, when the script runs, then it exits nonzero. Evidence: 0112f9b (JFP-T26); JFP-LAW-2.
- S2.1.2 Library found by type first — JFP-T50 — built As the owner, I want each library found by collection type before display name, and a non-JSON reply logged instead of crashing, so that the right tile is updated. Acceptance: Given a same-named library of another type listed first, when lookup runs, then the typed one wins. Evidence: b697d58 (JFP-T25), 9a5f84c (JFP-T13).
- S2.1.3 One double-click setup — JFP-T51 — built As the owner, I want
Start.batto install requirements, prompt for settings and do a first run, so that setup takes one step. Acceptance: Given a fresh machine with Python, when I runStart.bat, then the first refresh runs. Evidence: 41db6b5, b2f76fb, 2df67d7 (JFP-T11). - S2.1.4 Settings from Vault — JFP-T19 — built As the owner, I want the server URL, library names and key read from MindAttic Vault with
.envimported once, so that no secret lives in the repo. Acceptance: Given Vault holds the settings, when the script runs, then it uses them and ignores a stale.env. Evidence: bce162d (JFP-T19).
F2.2 Brochure page — JFP-T52 — built
- S2.2.1 Brochure page — JFP-T56 — built As a visitor, I want a one-page brochure for JellyFinPoster, so that I can see what it does. Acceptance: Given the repo's Pages site, when I open it, then the brochure shows. Evidence: 6327b91 (JFP-T38).
E3. Reliable refresh — JFP-T32 — MS-35
The refresh picks the right libraries and runs only from MindAttic.Scheduler.
F3.1 Library selection — JFP-T34 — MS-35 (990)
- T3.1.1 Pick the configured library when two share a type — JFP-T14 — MS-35 As the owner, I want the library that matches both the collection type and my configured name chosen first, then the first type match, then a name match, so that Movies and 4K Movies don't collide. Acceptance: Given two
movieslibraries, when the configured name is the second, then the second is updated; a pytest test intests/covers all three cases.
F3.2 Scheduler hand-off — JFP-T35 — MS-35 (980)
- T3.2.1 Retire the Windows scheduled task — JFP-T8 — MS-35 As the owner, I want
scripts/register_scheduled_task.ps1, its setup steps and bootstrap's task registration gone, so that the Scheduler jobJellyFinPoster.Refreshis the only runner. Acceptance: Given a freshStart.batrun, when it finishes, then no\MindAttic\JellyFinPostertask exists.
E4. JellyFinPoster 1.0 shipped — JFP-T33 — MS-35
A settled deploy plan and docs that match the code.
F4.1 Ships like every app — JFP-T36 — MS-35 (890)
- T4.1.1 Decide and wire how JellyFinPoster ships — JFP-T31 — MS-35 As the owner, I want a
.agent/publish.jsonthat either packages the script toR:\MindAttic\Apps\JellyFinPoster\{Debug,Release}with the shared run menu, or recordskind nonewith the reason, so that it ships like every MindAttic tool. Acceptance: Given the plan, whenGet-Planruns, then it returns that plan; if it deploys, Redeploy leaves a launching exe in both folders.
F4.2 Docs current (polish and release) — JFP-T37 — MS-35 (880)
- T4.2.1 docs/overview.md describes the script as it is — JFP-T6 — MS-35 As the owner, I want
docs/overview.mdand the BIBLE to describe Vault settings, the Scheduler job, the library pick rule and the deploy decision, so that the docs match the code. Acceptance: Given the milestone work landed, when I readdocs/overview.md, then nothing in it is out of date.
5. Non-functional requirements
- Platform: Windows, Python 3.10+, Pillow and requests (
requirements.txt). - Data and storage: no local state beyond the log file; the collage is built in memory (JPEG, quality 85).
- Security: the Jellyfin key comes from Vault or an untracked
.env; never committed (JFP-LAW-3). - Reliability: a library with too few posters keeps its image (JFP-LAW-1); any failure exits nonzero (JFP-LAW-2).
6. Interfaces and dependencies
- Platform concerns (docs/ECOSYSTEM.md §2.1): Credentials and settings: MindAttic.Vault. Scheduled jobs: MindAttic.Scheduler (its only runner). Shipping: the shared run menu.
- Jellyfin HTTP API:
GET /Library/VirtualFolders,GET /Items,GET /Items/{id}/Images/Primary,POST /Items/{libraryId}/Images/Primary. - MindAttic Vault: the
JellyFinPostersettings app and the sharedjellyfinnamed key (vault.py). - MindAttic.Scheduler: the nightly
JellyFinPoster.Refreshjob (M.SCHD-T7). - MindAttic.Agency: the shared run menu and brochure generator.
7. Release sequence
- MS-35 "JellyFinPoster unattended refresh" (active, the finished product): E3 Reliable refresh (900) and E4 Ship and document (800). E4's F4.2 is the polish-and-release step; the owner signs off on all four tiles refreshed by the nightly run. When MS-35 is reached, JellyFinPoster is finished.
8. Change log
| Date | Change to scope | Ticket |
|---|---|---|
| 2026-11-30 | Specification written from the BIBLE, docs/overview.md, the code, the commit log and the ticket history; MS-35 is the finished product; layouts, outside artwork and own scheduling moved to the Never list | MAT-T391 |
| 2026-11-30 | MAT-T462 single-source pass: 2 renamed (JFP-T33, T36), 0 buckets dissolved, 3 requires added (0 cross-repo), 0 platform re-points | MAT-T470 |