Skip to content

fix(jellycompat): serve the encoding config Jellyfin Web needs to draw ASS subtitles - #2857

Merged
Quick104 merged 4 commits into
mainfrom
fix/issue-2856-jellycompat-encoding-config
Oct 21, 2026
Merged

Quick104 merged 4 commits into
mainfrom
fix/issue-2856-jellycompat-encoding-config

Conversation

@Quick104

@Quick104 Quick104 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #2856
Related issue: N/A
Validation tasks: reaches #1246 C1 (not yet run)

Jellyfin Web shows no ASS/SSA subtitles on Silo. Before it starts its subtitle renderer, it loads GET /System/Configuration/encoding, and Silo answered that with 404, so the renderer never started. This affects anyone watching anime or other styled subtitles in Jellyfin Web or an app that embeds it. This change answers that request the way Jellyfin does.

In Jellyfin Web 12.1, Silo's default bundle, the renderer is created inside a Promise.all that includes getNamedConfiguration('encoding') and has no rejection handler (src/plugins/htmlVideoPlayer/plugin.js:1445-1466). Silo already delivers the ASS track as External, serves the file, and lists font attachments for the renderer; that request was the missing piece.

Approach

Authenticated GET /System/Configuration/{key} now returns {"EnableFallbackFont":false,"EnableSubtitleExtraction":true} for encoding. Jellyfin Web reads only EnableFallbackFont, and Silo serves no fallback fonts. The Kodi add-on reads EnableSubtitleExtraction from the same response, with a hard index, before offering embedded text subtitles. Silo extracts those and serves them as External, so true is accurate and matches Jellyfin's default. With the old 404, both of the add-on's subtitle setup paths threw. Keys match case-insensitively, and any other key returns 404, as in Jellyfin. Outside its admin dashboard, Jellyfin Web 12.1 reads no other key except livetv, which belongs to Live TV, a non-goal. The route sits in the session-auth group, so any signed-in profile can read it, which matches Jellyfin.

docs/jellycompat-api.md and the jellycompat route manifest list the new route. Native clients and /api/v2 are unaffected.

Validation

  • Live, Jellyfin Web 12.1 (built with Silo's installer) in Chrome 156 on a dev sandbox, over an HLS transcode, with an episode whose only subtitle is an embedded ASS track. On main, /System/Configuration/encoding returns 404, the .ass file is never requested, and no subtitle appears. On this PR's head, the request returns 200, the .ass file is fetched, and the styled subtitle is drawn at the same seek points.
  • Router test (route registered behind auth, encoding body, unknown key 404) fails on main with 404 for both requests and passes on this branch.
  • go test ./internal/jellycompat/ passes; make lint-changed reports 0 issues; make verify-local-paths passes.
  • Not checked: direct play in Chrome. Jellyfin Web cannot direct play the file on main at all, for an unrelated reason ([bug] Jellyfin Web in Chrome cannot direct play because PlaybackInfo always says TranscodingSubProtocol hls #2879). Kodi subtitle selection was not checked live either (no Kodi client); the add-on's read of EnableSubtitleExtraction comes from its source. The full Compatibility layers (Jellyfin / Audiobookshelf) — Jellyfin compatibility #1246 C1 smoke matrix was not walked.

Evidence: https://evidence.siloserver.org/r/silo-server/issue-2856/

Risks

A Jellyfin client that reads other EncodingOptions fields from this response would find them missing rather than getting a 404. Jellyfin's OpenAPI types the response as untyped JSON. Of the clients checked, Jellyfin Web 12.1 and the Kodi add-on read only the two fields served.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code in T3 Code
  • Tool(s): Claude Code agent with shell and GitHub CLI access
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, not yet human verified
  • Adversarial review: plan round skipped as a mechanical fix (root cause shown in the Jellyfin Web source, one small handler, nothing added beyond the route). Background review by Codex gpt-6.1-sol (xhigh) on 9bfafaa found no defects. Its note that the Kodi add-on reads EnableSubtitleExtraction was checked against the add-on source and is fixed in e7ba303.

🤖 Generated with Claude Code

…w ASS subtitles

Jellyfin Web creates its ASS/SSA renderer only after
GET /System/Configuration/encoding resolves, and draws nothing when it
fails. Answer that key with EnableFallbackFont false for any
authenticated user; other keys stay 404, as in Jellyfin.

Closes #2856

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 12 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08ae2c47-352f-47f1-af8d-a96ea0c6d16f
📥 Commits

Reviewing files that changed from the base of the PR and between e7ba303 and 8a6db13.

📒 Files selected for processing: 5
  • docs/jellycompat-api.md
  • internal/jellycompat/handlers_missing_endpoints_router_test.go
  • internal/jellycompat/handlers_system.go
  • internal/jellycompat/router.go
  • internal/jellycompat/testdata/media_routes.txt

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f2dc82cc-45e5-45a6-bf79-5f7c8daba679
📥 Commits

Reviewing files that changed from the base of the PR and between 6bfc5ff and e7ba303.

📒 Files selected for processing: 5
  • docs/jellycompat-api.md
  • internal/jellycompat/handlers_missing_endpoints_router_test.go
  • internal/jellycompat/handlers_system.go
  • internal/jellycompat/router.go
  • internal/jellycompat/testdata/media_routes.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

📝 Walkthrough

Adds an authenticated /System/Configuration/{key} route. Requests for encoding, matched without regard to case, return encoding settings. Other keys return 404.

Changes: Encoding configuration endpoint

Layer / File(s) Summary
Response contract and named-key handling
docs/jellycompat-api.md, internal/jellycompat/handlers_system.go
Documents the encoding response and implements case-insensitive key matching. The response disables fallback fonts and enables subtitle extraction. Unsupported keys return 404.
Authenticated route and validation
internal/jellycompat/router.go, internal/jellycompat/handlers_missing_endpoints_router_test.go, internal/jellycompat/testdata/media_routes.txt
Registers the authenticated route. Tests check the response and the 404 for livetv; route fixtures classify the endpoint as non-media.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: tomislav, blurbery

Merge Risk: ⚪ Minimal · up to e7ba3

The authenticated configuration endpoint matches the documented Jellyfin compatibility behavior with no concrete merge-blocking risk identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: serving the Jellyfin encoding configuration required for ASS subtitle rendering.
Linked Issues check Passed Issue #2856 requires an authenticated GET /System/Configuration/encoding response with EnableFallbackFont, case-insensitive key matching, and 404 for unknown keys. HandleNamedConfiguration uses …
Out of Scope Changes check Passed The changed handler, authenticated route registration, route manifest updates, documentation, and router test all support the Jellyfin compatibility endpoint required by #2856. `EnableSubtitleExtracti…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 …
Description check Passed The pull request description clearly explains the added authenticated Jellyfin configuration endpoint, its subtitle-rendering purpose, route behavior, documentation, tests, and validation.
Full details: Linked Issues check

Explanation

Issue #2856 requires an authenticated GET /System/Configuration/encoding response with EnableFallbackFont, case-insensitive key matching, and 404 for unknown keys. HandleNamedConfiguration uses strings.EqualFold, returns 404 for other keys, and returns EnableFallbackFont:false with EnableSubtitleExtraction:true for encoding. The route test verifies authentication, the 200 response body, and the unknown-key 404. The route is documented. Live subtitle playback was not tested, but it is not a coding requirement for #2856.

Full details: Out of Scope Changes check

Explanation

The changed handler, authenticated route registration, route manifest updates, documentation, and router test all support the Jellyfin compatibility endpoint required by #2856. EnableSubtitleExtraction:true supports the same compatibility response for the Kodi add-on and does not change native clients or /api/v2. No unrelated change is demonstrated.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (2 skipped: 2 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 21, 2026
@silo-kody

silo-kody Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

The Kodi add-on indexes EnableSubtitleExtraction from
/System/Configuration/encoding before offering embedded text
subtitles. Silo extracts those and serves them as External, so report
true, matching Jellyfin's default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

silo-kody Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage

silo-triage Bot commented Oct 21, 2026

Copy link
Copy Markdown

The router test covers the endpoint, but the PR says ASS/SSA rendering and Kodi subtitle selection have not been checked live. Please add before-and-after captures of ASS/SSA rendering in Jellyfin Web and embedded subtitle selection in Kodi, using the same media and naming the builds, or have a maintainer explicitly waive those captures.

@macroscopeapp

This comment has been minimized.

…ompat-encoding-config

# Conflicts:
#	internal/jellycompat/handlers_system.go
@Quick104

Copy link
Copy Markdown
Contributor Author

Added live captures for Jellyfin Web 12.1 in Chrome on a dev sandbox, using the same episode (embedded ASS track) and the same seek points. On main b93c8f5, /System/Configuration/encoding returns 404 and no subtitle is drawn. On this PR's head 943d342 (the same main plus this PR), it returns 200, Jellyfin Web fetches the .ass file, and the styled subtitle appears. These runs used an HLS transcode.

Two gaps remain, and both are noted in the PR body:

@Quick104
Quick104 merged commit 9df6f6a into main Oct 21, 2026
16 checks passed
@Quick104
Quick104 deleted the fix/issue-2856-jellycompat-encoding-config branch October 21, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Jellyfin Web draws no ASS/SSA subtitles because /System/Configuration/encoding returns 404

1 participant