# JRay A Jellyfin plugin that brings an actor-overlay (think Amazon "X-Ray") feature to your media: pause a movie and JRay shows you which actors are on screen at that exact moment. JRay reads "truth" files produced offline by the [scene-actor-extraction](https://github.com/dtourolle/scene-actor-extraction) pipeline (face detection + recognition) and exposes an API to query which actors are visible at a given timestamp. A small overlay, injected into the Jellyfin web client, displays the result when you pause playback. ## Status **Alpha** — JRay works end to end (sidecar truth files, remote truth push, and the pause overlay) but is early software and the truth-file schema may still change. The overlay relies on patching the web client's `index.html`, which is inherently a little fragile across Jellyfin versions (see [Important Notes](#important-notes)). ## Quick Install Add this repository URL in Jellyfin (Dashboard → Plugins → Repositories): ``` https://gitea.tourolle.paris/dtourolle/jRay/raw/branch/master/manifest.json ``` Then install "JRay" from the plugin catalog and restart Jellyfin. ## Features - **Pause overlay** — pause a movie or episode in the web client and see the actors currently on screen, without leaving the player. - **Sidecar truth files** — drop a `Movie.jray.json` next to `Movie.mkv` and JRay picks it up automatically (suffix configurable). - **Remote truth push** — for servers that can't run the extraction pipeline locally, a remote worker can `PUT` truth data over HTTP. Managed (pushed) data takes precedence over sidecar files. - **Work discovery API** — a remote worker can poll for a random batch of library items that still need processing, so the backlog spreads naturally across workers without server-side task tracking. - **Extensible "context at time t" envelope** — the per-timestamp response is designed to grow (locations, trivia, …) without breaking existing clients. - **In-memory caching** — loaded truth files are cached with a configurable TTL. - **Toggleable overlay** — disabling the overlay also cleanly removes the injected script from the web client. ## How It Works ``` scene-actor-extraction Jellyfin server web client (offline pipeline) (browser) ┌────────────────────┐ ┌──────────────────┐ ┌────────────┐ │ face detection + │ truth │ JRay plugin │ jray?t= │ pause │ │ recognition │ ───────► │ - sidecar reader │ ◄─────── │ overlay │ │ result_sink_node │ file │ - managed store │ actors │ script │ └────────────────────┘ │ - REST API │ ───────► └────────────┘ │ PUT /Truth (remote) │ - web patcher │ └────────────────────────►└──────────────────┘ ``` 1. The extraction pipeline analyses a film offline and emits a **truth file** listing each detected actor and the time windows they're on screen. 2. JRay loads that truth file either from a **sidecar** next to the media (`Movie.jray.json`) or from a **managed store** populated via the push API. 3. On startup JRay injects a small `