fix(jellyfin): inline-validate the off-media config folder field (like Plex)#275
Merged
Merged
Conversation
…e Plex) The off-media "Jellyfin config folder" settings field had no inline validation — only the Setup Health tab checked it (#274). The Plex config-folder field validates live via /api/settings/validate-plex-config-folder; this adds the Jellyfin equivalent so the field shows valid/invalid as you type. - New POST /api/settings/validate-jellyfin-config-folder (mirrors the Plex one): {exists, valid_jellyfin_structure, writable, detail, error}. Unlike Plex it isn't restricted to a fixed root (Jellyfin config is an arbitrary admin mount); admin-only, read-only stat, null-byte guarded. - Extracted looks_like_jellyfin_config_dir()/jellyfin_config_data_marker() into output/jellyfin_trickplay.py and pointed BOTH the Setup Health probe and the new endpoint at them, so the field validator and the health check can never disagree. - servers.js: the editJellyfinConfigFolder field is wired to the live validator (bound once; validates on input, on browse-pick, and on open when off-media is on) and routed to the new endpoint with a "Valid Jellyfin config folder" message. servers.html: added the invalid/valid feedback spans + has-validation to the field's input-group so messages render. Tests: endpoint valid-via-data, valid-via-plugins, not-found, wrong-folder (media dir) -> error, empty -> neutral, valid-but-read-only -> flagged. Architecture Review run; the MED (read-only branch coverage) fixed before commit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YC1Z1JFBVJ5xKi5YAqYKfc
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #275 +/- ##
=======================================
Coverage 83.99% 84.00%
=======================================
Files 89 89
Lines 19640 19670 +30
=======================================
+ Hits 16496 16523 +27
- Misses 3144 3147 +3
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The off-media "Jellyfin config folder" settings field had no inline validation — only the Setup Health tab checked it (#274). The Plex field validates live; this adds the Jellyfin equivalent so the field shows valid/invalid as you type (exactly what was expected when you flagged it).
What changed
POST /api/settings/validate-jellyfin-config-folder(mirrorsvalidate-plex-config-folder): returns{exists, valid_jellyfin_structure, writable, detail, error}. Not restricted to a fixed root (Jellyfin config is an arbitrary admin mount); admin-only, read-only stat, null-byte guarded.looks_like_jellyfin_config_dir()so the field validator and the Setup Health probe use identical checks (can never disagree).has-validationto the input-group so messages render.Tests
valid-via-
data/, valid-via-plugins/, not-found, wrong-folder (media dir) → error, empty → neutral, valid-but-read-only → flagged. Architecture Review run — no HIGH; the MED (read-only branch coverage) fixed before commit.🤖 Generated with Claude Code