Skip to content

feat(config): live admin settings + truthful restart-required banner - #128

Merged
Quick104 merged 10 commits into
mainfrom
feat/live-admin-settings
Jun 10, 2026
Merged

Quick104 merged 10 commits into
mainfrom
feat/live-admin-settings

Conversation

@Quick104

@Quick104 Quick104 commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Every save in the admin settings UI showed "restart required" because useSettingsForm.save() set the flag unconditionally — the backend was never asked. Auditing every key showed the reality was worse in both directions: ~20 settings were already applied live (the banner was just wrong), ~25 were frozen at startup for no structural reason, and 5 settings were wired to nothing at all (saving + restarting changed no behavior). Only the infrastructure settings (DB pool, S3 clients, Redis, userdb backend, listeners) genuinely need a restart.

Approach

The hot-reload machinery already existed — nodeconfig.Watcher reloads config on EventSettingsChanged + a 60s poll with an atomic pointer swap — but was only wired into the proxy/transcode worker modes. This PR extends it to integrated mode and converts consumers incrementally (one commit per area, each shrinking the restart-required registry):

  1. Watcher hardening — non-blocking RequestReload() (avoids a stale-swap race that ForceReload from request handlers would allow), deep-equal guard so the 60s poll doesn't fire callbacks on no-op reloads, RedisURL bootstrap override (a reload previously clobbered an env-provided Redis URL).
  2. Integrated-mode wiring — watcher started in integrated/api mode; LiveConfig/OnConfigChange func-typed fields on api.Dependencies and jellycompat.Dependencies (nil falls back to the startup snapshot, keeping tests/workers unchanged); settings saves nudge the watcher directly so changes apply instantly even without Redis.
  3. Truthful banner — central registry (internal/config/restart_keys.go); PUT /admin/settings/{key} returns restart_required; the UI raises the banner only when a saved key needs it.
  4. Conversions — pull-based (read live config at use time) for handlers that already see *config.Config (playback, jellycompat); push-based atomic setters wired to OnConfigChange for decoupled packages (llm client, subtitle/metadata AI services, scanner, matcher, mdblist, slog LevelVar, logfilter). Per-use snapshots keep a single request/job internally consistent across reloads.

Now live without restart: log level/quiet, token expiries (new tokens), jellycompat identity fields, transcode dir + per-session ffmpeg/hwaccel, scanner/matcher concurrency, metadata.cache_images, MDBList key, and the entire AI Services page except ai.max_concurrent_jobs (fixed-capacity semaphore). Still restart-required: database.*, userdb.*, s3.*, redis.*, ratelimit backend, JWT secret, compat listeners/session TTLs, tmdb.api_key, recommendations.*, chapter-thumbnail workers.

Bugs found and fixed along the way

  • playback.hw_device was parsed but never wired in integrated mode — local transcodes always ran with an empty HW device while transcode nodes honored it.
  • playback.transcode_enabled did nothing: the resolver received a hardcoded true. Now wired and live.
  • Dead knobs removed from UI + config (playback.allow_hevc_encoding, playback.transcode_ahead_segments, playback.segment_duration, scanner.file_removal_grace) — none had any consumer. YAML import still tolerates the legacy keys.

Risks / notes for review

  • The restart-key registry is the contract: a key wrongly absent from it would show "applied live" while actually frozen. It was built from a full consumer audit and starts conservative; please flag anything you know to be frozen that isn't listed.
  • Converted fields use atomics (atomic.Pointer/Int32/Bool) — no plain field writes from reload callbacks; all touched packages pass go test -race.
  • Without Redis, UI saves apply instantly (the save handler nudges the watcher); direct DB edits take up to 60s (poll).
  • ffmpeg_path/hw_accel stay restart-required despite the playback handler reading them live, because scanner ffprobe, chapter thumbnails, and the audiobook enricher still freeze them at startup — converting those is natural follow-up work.
  • UI change is subtle: the restart banner in admin settings now appears only for restart-required keys; DownloadSettings/OverlaySettings lost their hardcoded restartRequired={false} special-casing.

Verification

go build ./..., go vet ./..., go test -race across all touched packages (nodeconfig, auth, jellycompat, scanner, metadata/, mdblist, subtitles/ai, ai/, logfilter, api/*, config), web eslint + prettier --check + vitest (incl. new tests for the banner aggregation, logfilter prefix swapping, and watcher coalescing/no-op suppression), make verify-local-paths. golangci-lint was not available locally — relying on CI for that gate.

AI use

Implemented end-to-end with Claude Code (audit, plan, implementation, tests), human-directed and reviewed per commit.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Configuration hot-reload support for logging level, worker counts, image caching, API keys, and token expiry settings without requiring restart
    • Admin API now indicates which settings require server restart
  • UI/UX Improvements

    • Settings pages display actual restart requirements based on configuration changes
    • Playback settings updated with 4K transcoding and throttle options
    • Simplified scanner settings UI
  • Configuration Updates

    • Removed deprecated transcoding and scanner configuration options

Quick104 and others added 10 commits June 10, 2026 17:36
- RequestReload(): non-blocking, coalescing reload nudge that runs on the
  poll goroutine, so concurrent requests can never swap a stale snapshot
  over a newer one (unlike ForceReload from request handlers)
- Skip OnChange callbacks when the reloaded config is deep-equal to the
  previous one, so the 60s poll doesn't fire rebuild/log callbacks on
  no-op reloads
- Add RedisURL to BootstrapOverrides; previously a reload clobbered an
  env-provided Redis URL in the live config
- Split reload into fetchSettings/applySettings and add unit tests

Co-Authored-By: Claude Fable 5 <[email protected]>
Start nodeconfig.Watcher in integrated/api mode (previously only proxy/
transcode worker modes hot-reloaded). Expose the live config to the API
and jellycompat routers via func-typed LiveConfig/OnConfigChange fields
with nil fallbacks to the startup snapshot, and wire the admin settings
update hook to RequestReload so same-process changes apply immediately
even without Redis.

No consumer reads the live config yet — conversions land separately.

Co-Authored-By: Claude Fable 5 <[email protected]>
The settings UI showed 'restart required' after every save regardless of
the key. The backend now classifies each key via a central registry
(internal/config/restart_keys.go) and PUT /admin/settings/{key} reports
restart_required per key; useSettingsForm only raises the banner when a
saved key actually needs a restart (and keeps it raised until restart).

The registry is conservative: every currently startup-frozen key is
marked restart-required; subsequent hot-reload conversions shrink it.
Settings read live from the settings repo (branding, overlays, markers,
download.*, ...) default to no-restart. DownloadSettings/OverlaySettings
drop their hardcoded restartRequired={false} special-casing.

Co-Authored-By: Claude Fable 5 <[email protected]>
Share one slog.LevelVar across the handler chain and make
logfilter.Handler's quiet-prefix list an atomic pointer shared with
WithAttrs/WithGroup clones (New previously returned the inner handler
unwrapped when the quiet list was empty, leaving nothing to update).
The integrated-mode config watcher now applies both settings live;
their keys leave the restart-required registry.

Co-Authored-By: Claude Fable 5 <[email protected]>
JWTService stores expiries as atomics with a SetExpiries hook; all three
instances (main API, ABS compat, jellycompat) re-apply them on config
reload. Applies to newly issued tokens; outstanding tokens keep their
original expiry. The JWT secret stays fixed for the process lifetime.

Co-Authored-By: Claude Fable 5 <[email protected]>
The playback and stream handlers pull ffmpeg path / hwaccel / transcode
dir from the live config when starting a transcode or extracting
subtitles, instead of values frozen at router construction. Each session
snapshots the config once so its output dir and binary stay consistent.

Also fixes a real bug: playback.hw_device was parsed into the config but
never wired into the integrated-mode handler, so local transcodes always
ran with an empty HWDevice while transcode nodes honored it.

playback.transcode_dir leaves the restart-required registry (the handler
is its only consumer); ffmpeg_path/hw_accel stay restart-required until
scanner/chapterthumbs/audiobook consumers convert.

Co-Authored-By: Claude Fable 5 <[email protected]>
System/Auth handlers take a config provider instead of the startup
snapshot, so jellyfin_compat.public_url, .server_name, and
.emulated_server_version apply without restart. server_id stays
restart-required (generate-once, baked into the resource mapper), as do
the session-store TTLs.

Co-Authored-By: Claude Fable 5 <[email protected]>
scanner.workers, matcher.workers/batch_size, metadata.cache_images, and
mdblist.api_key convert to atomic fields with setters wired to the
config watcher. Worker counts apply on the next scan/match cycle (the
loops read them per cycle); the MDBList key applies to the next request.

Co-Authored-By: Claude Fable 5 <[email protected]>
The shared llm.Client holds its config behind an atomic pointer
(UpdateConfig; each request snapshots once), and the subtitle/metadata
AI services gain UpdateConfig plus setters on the translator (batching)
and Whisper transcriber (ffmpeg path, chunk seconds). The router derives
their configs from shared helpers used both at construction and in
OnConfigChange callbacks, re-evaluating the chat-only-gateway transcribe
guard on each reload and warning only when it newly fires.

Everything on the AI Services page now applies without restart except
ai.max_concurrent_jobs (fixed-capacity dispatch semaphore).

Co-Authored-By: Claude Fable 5 <[email protected]>
…nobs

playback.transcode_enabled was parsed into the config but the resolver
always received a hardcoded true — the admin toggle did nothing. It now
reads the live config per playback start, so disabling transcodes
applies without restart.

Remove settings that were wired to nothing so 'save + restart' stops
pretending: playback.allow_hevc_encoding (resolver field never
assigned), playback.transcode_ahead_segments and
playback.segment_duration (parsed, never consumed — segment duration is
per-session from the client), scanner.file_removal_grace (DeleteMissing
is never called). UI fields removed and the config struct fields pruned
so they don't resurrect; YAML import still tolerates the legacy keys.

Co-Authored-By: Claude Fable 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR implements live configuration reloading for multiple server components using atomic types and a config watcher, allowing settings like logging levels, worker counts, auth expiry, and LLM endpoints to update without restart. It also introduces restart-requirement tracking to distinguish restart-gated settings from hot-reloadable ones.

Changes

Hot-reload configuration without restart

Layer / File(s) Summary
Config watcher and infrastructure
internal/nodeconfig/watcher.go, internal/nodeconfig/watcher_test.go
Watcher now coalesces reload requests, skips callbacks on no-op reloads via deep-equal guard, persists bootstrap overrides (RedisURL), and provides RequestReload() for non-blocking reload triggers from request handlers.
Restart requirement tracking
internal/config/restart_keys.go, internal/config/restart_keys_test.go, internal/api/handlers/admin.go, internal/api/handlers/admin_settings_checks_test.go, web/src/api/types.ts
Defines explicit restart-required keys and prefix patterns; RestartRequired(key) determines if updates require restart. Admin API response now includes restart_required flag; frontend receives and displays restart banners conditionally.
Atomic JWT and auth configuration
internal/auth/jwt.go
JWT service stores access/refresh expiry in atomic.Int64 nanoseconds; SetExpiries updates them concurrently for live token generation.
Atomic logging configuration
cmd/silo/main.go, internal/logfilter/handler.go, internal/logfilter/handler_test.go
Log level uses slog.LevelVar and quiet-prefix list uses atomic.Pointer[[]string]; SetQuiet enables live filtering updates without restart.
Atomic LLM and transcription configuration
internal/ai/llm/client.go, internal/ai/llm/transcribe.go, internal/subtitles/ai/transcriber.go, internal/subtitles/ai/transcriber_test.go, internal/subtitles/ai/translator.go
LLM client, transcriber, and translator store config in atomics; UpdateConfig, SetExtraction, SetBatching enable live updates to endpoints, extraction parameters, and batching.
Atomic metadata service configuration
internal/metadata/service.go, internal/metadata/translation/service.go, internal/metadata/worker.go
Metadata cache-images flag, translation service config, and match worker concurrency use atomics for live reloading.
Atomic scanner and discovery configuration
internal/scanner/scanner.go, internal/mdblist/discovery.go
Scanner worker count and MDBList API key stored in atomics; SetWorkers and SetAPIKey apply updates live.
Dynamic playback configuration
internal/api/handlers/playback.go, internal/api/handlers/playback_test.go, internal/playback/resolver.go, internal/playback/resolver_test.go
Playback handler replaces static ffmpeg/transcode fields with PlaybackConfig provider function reading from CurrentConfig().Playback at runtime.
Dynamic stream ffmpeg path
internal/api/handlers/stream.go
Stream handler derives ffmpeg path from playback config provider instead of stored field.
Jellyfin auth config providers
internal/jellycompat/handlers_auth.go, internal/jellycompat/handlers_system.go, internal/jellycompat/router.go, internal/jellycompat/auth_api_key_session_test.go, internal/jellycompat/server.go
Auth and system handlers use config provider functions to read ServerID and endpoint info per-request instead of from startup config snapshot.
Subtitle quota atomic snapshot
internal/subtitles/ai/quota.go, internal/subtitles/ai/service.go
Quota service reads from atomic config snapshots instead of stored fields.
API router hot-reload wiring
internal/api/router.go
Router wires LiveConfig and OnConfigChange callbacks to update JWT service, playback config, subtitle AI, and metadata AI on reload; provides CurrentConfig() accessor.
Main startup and config watcher integration
cmd/silo/main.go
Integrates config watcher for integrated/api mode, wires OnChange callbacks to update logging, scanner workers, matcher concurrency, metadata caching, mdblist key, and JWT expiry; adds OnServerSettingUpdated hook to trigger reload on in-process setting changes.
Removed configuration fields
internal/config/config.go, internal/config/db_loader.go, internal/config/yaml_import.go
Removes scanner FileRemovalGrace and playback AllowHEVCEncoding, TranscodeAheadSegments, SegmentDuration from structs, DB loader, and YAML import.
Frontend restart requirement UI
web/src/hooks/useSettingsForm.ts, web/src/hooks/useSettingsForm.test.ts, web/src/hooks/queries/admin/settings.ts, web/src/pages/admin-settings/*.tsx
Frontend collects restart-required flags across multiple settings saves, conditionally displays restart banners, and updates playback and scanner settings forms to reflect removed/added keys.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • Silo-Server/silo-server#2: Related hot-reload infrastructure for server-setting changes that trigger config reloads via OnServerSettingUpdated callbacks.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main features: live admin settings reload capability and a truthful restart-required indicator.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/live-admin-settings

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

@Quick104
Quick104 merged commit 02c2286 into main Jun 10, 2026
1 check was pending
@Quick104
Quick104 deleted the feat/live-admin-settings branch June 10, 2026 23:25
Quick104 added a commit that referenced this pull request Jun 11, 2026
…128)

* feat(nodeconfig): harden config watcher for integrated-mode use

- RequestReload(): non-blocking, coalescing reload nudge that runs on the
  poll goroutine, so concurrent requests can never swap a stale snapshot
  over a newer one (unlike ForceReload from request handlers)
- Skip OnChange callbacks when the reloaded config is deep-equal to the
  previous one, so the 60s poll doesn't fire rebuild/log callbacks on
  no-op reloads
- Add RedisURL to BootstrapOverrides; previously a reload clobbered an
  env-provided Redis URL in the live config
- Split reload into fetchSettings/applySettings and add unit tests

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(config): hot-reload config watcher in integrated mode

Start nodeconfig.Watcher in integrated/api mode (previously only proxy/
transcode worker modes hot-reloaded). Expose the live config to the API
and jellycompat routers via func-typed LiveConfig/OnConfigChange fields
with nil fallbacks to the startup snapshot, and wire the admin settings
update hook to RequestReload so same-process changes apply immediately
even without Redis.

No consumer reads the live config yet — conversions land separately.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(admin): truthful restart-required banner for settings saves

The settings UI showed 'restart required' after every save regardless of
the key. The backend now classifies each key via a central registry
(internal/config/restart_keys.go) and PUT /admin/settings/{key} reports
restart_required per key; useSettingsForm only raises the banner when a
saved key actually needs a restart (and keeps it raised until restart).

The registry is conservative: every currently startup-frozen key is
marked restart-required; subsequent hot-reload conversions shrink it.
Settings read live from the settings repo (branding, overlays, markers,
download.*, ...) default to no-restart. DownloadSettings/OverlaySettings
drop their hardcoded restartRequired={false} special-casing.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(logging): hot-reload server.log_level and server.log_quiet

Share one slog.LevelVar across the handler chain and make
logfilter.Handler's quiet-prefix list an atomic pointer shared with
WithAttrs/WithGroup clones (New previously returned the inner handler
unwrapped when the quiet list was empty, leaving nothing to update).
The integrated-mode config watcher now applies both settings live;
their keys leave the restart-required registry.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(auth): hot-reload access/refresh token expiries

JWTService stores expiries as atomics with a SetExpiries hook; all three
instances (main API, ABS compat, jellycompat) re-apply them on config
reload. Applies to newly issued tokens; outstanding tokens keep their
original expiry. The JWT secret stays fixed for the process lifetime.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(playback): read transcode config live at session start

The playback and stream handlers pull ffmpeg path / hwaccel / transcode
dir from the live config when starting a transcode or extracting
subtitles, instead of values frozen at router construction. Each session
snapshots the config once so its output dir and binary stay consistent.

Also fixes a real bug: playback.hw_device was parsed into the config but
never wired into the integrated-mode handler, so local transcodes always
ran with an empty HWDevice while transcode nodes honored it.

playback.transcode_dir leaves the restart-required registry (the handler
is its only consumer); ffmpeg_path/hw_accel stay restart-required until
scanner/chapterthumbs/audiobook consumers convert.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(jellycompat): read compat identity settings live per request

System/Auth handlers take a config provider instead of the startup
snapshot, so jellyfin_compat.public_url, .server_name, and
.emulated_server_version apply without restart. server_id stays
restart-required (generate-once, baked into the resource mapper), as do
the session-store TTLs.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(scanner,metadata,mdblist): hot-reload worker pools and API key

scanner.workers, matcher.workers/batch_size, metadata.cache_images, and
mdblist.api_key convert to atomic fields with setters wired to the
config watcher. Worker counts apply on the next scan/match cycle (the
loops read them per cycle); the MDBList key applies to the next request.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(ai): hot-reload AI connection, models, toggles, and quotas

The shared llm.Client holds its config behind an atomic pointer
(UpdateConfig; each request snapshots once), and the subtitle/metadata
AI services gain UpdateConfig plus setters on the translator (batching)
and Whisper transcriber (ffmpeg path, chunk seconds). The router derives
their configs from shared helpers used both at construction and in
OnConfigChange callbacks, re-evaluating the chat-only-gateway transcribe
guard on each reload and warning only when it newly fires.

Everything on the AI Services page now applies without restart except
ai.max_concurrent_jobs (fixed-capacity dispatch semaphore).

Co-Authored-By: Claude Fable 5 <[email protected]>

* fix(playback): wire transcode_enabled; remove dead playback/scanner knobs

playback.transcode_enabled was parsed into the config but the resolver
always received a hardcoded true — the admin toggle did nothing. It now
reads the live config per playback start, so disabling transcodes
applies without restart.

Remove settings that were wired to nothing so 'save + restart' stops
pretending: playback.allow_hevc_encoding (resolver field never
assigned), playback.transcode_ahead_segments and
playback.segment_duration (parsed, never consumed — segment duration is
per-session from the client), scanner.file_removal_grace (DeleteMissing
is never called). UI fields removed and the config struct fields pruned
so they don't resurrect; YAML import still tolerates the legacy keys.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Quick104 added a commit that referenced this pull request Jun 17, 2026
…128)

* feat(nodeconfig): harden config watcher for integrated-mode use

- RequestReload(): non-blocking, coalescing reload nudge that runs on the
  poll goroutine, so concurrent requests can never swap a stale snapshot
  over a newer one (unlike ForceReload from request handlers)
- Skip OnChange callbacks when the reloaded config is deep-equal to the
  previous one, so the 60s poll doesn't fire rebuild/log callbacks on
  no-op reloads
- Add RedisURL to BootstrapOverrides; previously a reload clobbered an
  env-provided Redis URL in the live config
- Split reload into fetchSettings/applySettings and add unit tests

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(config): hot-reload config watcher in integrated mode

Start nodeconfig.Watcher in integrated/api mode (previously only proxy/
transcode worker modes hot-reloaded). Expose the live config to the API
and jellycompat routers via func-typed LiveConfig/OnConfigChange fields
with nil fallbacks to the startup snapshot, and wire the admin settings
update hook to RequestReload so same-process changes apply immediately
even without Redis.

No consumer reads the live config yet — conversions land separately.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(admin): truthful restart-required banner for settings saves

The settings UI showed 'restart required' after every save regardless of
the key. The backend now classifies each key via a central registry
(internal/config/restart_keys.go) and PUT /admin/settings/{key} reports
restart_required per key; useSettingsForm only raises the banner when a
saved key actually needs a restart (and keeps it raised until restart).

The registry is conservative: every currently startup-frozen key is
marked restart-required; subsequent hot-reload conversions shrink it.
Settings read live from the settings repo (branding, overlays, markers,
download.*, ...) default to no-restart. DownloadSettings/OverlaySettings
drop their hardcoded restartRequired={false} special-casing.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(logging): hot-reload server.log_level and server.log_quiet

Share one slog.LevelVar across the handler chain and make
logfilter.Handler's quiet-prefix list an atomic pointer shared with
WithAttrs/WithGroup clones (New previously returned the inner handler
unwrapped when the quiet list was empty, leaving nothing to update).
The integrated-mode config watcher now applies both settings live;
their keys leave the restart-required registry.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(auth): hot-reload access/refresh token expiries

JWTService stores expiries as atomics with a SetExpiries hook; all three
instances (main API, ABS compat, jellycompat) re-apply them on config
reload. Applies to newly issued tokens; outstanding tokens keep their
original expiry. The JWT secret stays fixed for the process lifetime.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(playback): read transcode config live at session start

The playback and stream handlers pull ffmpeg path / hwaccel / transcode
dir from the live config when starting a transcode or extracting
subtitles, instead of values frozen at router construction. Each session
snapshots the config once so its output dir and binary stay consistent.

Also fixes a real bug: playback.hw_device was parsed into the config but
never wired into the integrated-mode handler, so local transcodes always
ran with an empty HWDevice while transcode nodes honored it.

playback.transcode_dir leaves the restart-required registry (the handler
is its only consumer); ffmpeg_path/hw_accel stay restart-required until
scanner/chapterthumbs/audiobook consumers convert.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(jellycompat): read compat identity settings live per request

System/Auth handlers take a config provider instead of the startup
snapshot, so jellyfin_compat.public_url, .server_name, and
.emulated_server_version apply without restart. server_id stays
restart-required (generate-once, baked into the resource mapper), as do
the session-store TTLs.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(scanner,metadata,mdblist): hot-reload worker pools and API key

scanner.workers, matcher.workers/batch_size, metadata.cache_images, and
mdblist.api_key convert to atomic fields with setters wired to the
config watcher. Worker counts apply on the next scan/match cycle (the
loops read them per cycle); the MDBList key applies to the next request.

Co-Authored-By: Claude Fable 5 <[email protected]>

* feat(ai): hot-reload AI connection, models, toggles, and quotas

The shared llm.Client holds its config behind an atomic pointer
(UpdateConfig; each request snapshots once), and the subtitle/metadata
AI services gain UpdateConfig plus setters on the translator (batching)
and Whisper transcriber (ffmpeg path, chunk seconds). The router derives
their configs from shared helpers used both at construction and in
OnConfigChange callbacks, re-evaluating the chat-only-gateway transcribe
guard on each reload and warning only when it newly fires.

Everything on the AI Services page now applies without restart except
ai.max_concurrent_jobs (fixed-capacity dispatch semaphore).

Co-Authored-By: Claude Fable 5 <[email protected]>

* fix(playback): wire transcode_enabled; remove dead playback/scanner knobs

playback.transcode_enabled was parsed into the config but the resolver
always received a hardcoded true — the admin toggle did nothing. It now
reads the live config per playback start, so disabling transcodes
applies without restart.

Remove settings that were wired to nothing so 'save + restart' stops
pretending: playback.allow_hevc_encoding (resolver field never
assigned), playback.transcode_ahead_segments and
playback.segment_duration (parsed, never consumed — segment duration is
per-session from the client), scanner.file_removal_grace (DeleteMissing
is never called). UI fields removed and the config struct fields pruned
so they don't resurrect; YAML import still tolerates the legacy keys.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant