JR-021, JR-022, JR-023: File Transformation is a hard dependency
🏗️ Build Plugin / build (push) Successful in 59s
Latest Release / latest-release (push) Successful in 30s
🧪 Test Plugin / test (push) Successful in 22s

Deletes the on-disk index.html injection rather than leaving it switched off.
Plugin.cs had already stopped calling it, but an unreachable write path with a
live signature is the one a later refactor re-enables by accident, and it was
still the behaviour the README and the release changelog advertised.

Patching index.html on disk is destructive in ways a plugin cannot clean up
after: the patch outlives an uninstall, a web-client upgrade discards it
silently, and it races any other plugin touching the same file. It is also a
second code path, and the one nobody runs is the one that rots.

WebClientPatchService is now removal-only. The strip is factored out as
RemoveInjection so it is testable without a filesystem. Removal is the one
write JR-021 permits -- an earlier JRay did patch the file, and those users
must not be left with a stale injection pointing at endpoints that have since
changed. It keys on JRay's own marker, so it touches nothing another plugin
added.

JR-021 is a requirement to *not do* something, which no unit test can
demonstrate, so scripts/checks/no-index-injection.sh verifies it by absence.
The check was confirmed to fail on a reintroduced Apply() and on reintroduced
ReplaceLast injection -- a check that has only ever passed is not evidence.

Jellyfin has no plugin dependency mechanism, so nothing installs File
Transformation for the user and a log warning alone is one nobody reads.
GET /Plugins/JRay/Status/Dependencies reports whether the dependency is
satisfied, and the configuration page renders it with the repository URL and
what to do with it. Absent the plugin only the overlay is disabled; every
other feature works.

JR-022 and JR-023 stay In Progress rather than Done: neither has a test that
executes, and this repo has no test project yet.

TRACES: JR-021, JR-022, JR-023 | PR-004

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-30 18:58:12 +02:00
co-authored by Claude Opus 5
parent 3b24fe1b3c
commit d9a38bb7fb
9 changed files with 425 additions and 36 deletions
+19
View File
@@ -25,6 +25,25 @@ https://gitea.tourolle.paris/dtourolle/jRay/raw/branch/master/manifest.json
Then install "JRay" from the plugin catalog and restart Jellyfin.
### Required for the overlay: File Transformation
JRay's pause overlay needs a script tag in the web client's `index.html`.
Install [File Transformation](https://github.com/IAmParadox27/jellyfin-plugin-file-transformation)
(repository `https://www.iamparadox.dev/jellyfin/plugins/manifest.json`) **before**
installing JRay. It rewrites the page as it is served, so the file on disk is
never touched — that survives server upgrades and coexists with other plugins
patching the same file.
**There is no fallback.** JRay never edits `index.html` on disk: a patch there
outlives an uninstall, is silently discarded by a web-client upgrade, and races
any other plugin touching the file. Without File Transformation the pause
overlay is simply disabled — every other JRay feature works normally, and the
plugin's configuration page tells you what is missing and how to install it.
Upgrading from an older JRay that did patch `index.html`? It removes its own
patch on startup, so there is nothing to clean up by hand. See
[SPEC.md](SPEC.md) JR-021/JR-022.
## Features
- **Pause overlay** — pause a movie or episode in the web client and see the