Skip to content

Jellyfin and Emby setup is optional and can be run from the app later - #77

Merged
eschultz merged 3 commits into
stagingfrom
fix/media-server-setup-optional
Oct 17, 2026
Merged

eschultz merged 3 commits into
stagingfrom
fix/media-server-setup-optional

Conversation

@eschultz

@eschultz eschultz commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🔍 Problem

Installing Jellyfin asks for an admin username and password after the app is created. When nobody answers within 10 minutes, the whole install fails ("Hook configure-jellyfin timed out waiting for user input"), though Jellyfin is installed and running. In the last 30 days (prod events, 2026-10-16) that hit about 23 users, and each failure also shows up as "parent failed" and "stale" rows under it. Emby's hook has the same setting (optional: false) and would fail the same way. Plex's hook is optional, so a timeout there only skips the setup.

🛠️ Change

Rule Why
Both hooks are optional: true. An unanswered prompt or a failed setup skips the setup, and the install completes.
Both hooks are also card actions: events: ["onAfterInstall", "userAction"], rerun: "converge", surfaces: ["card"]. The app's Connections tab and Options > App Actions offer "Pre-configure Jellyfin" / "Pre-configure Emby", which asks for the login again. So a user who skipped, or let the prompt time out, can still run the setup. card only, so the button stays off Jellyfin's now-playing widget.
Run from the card, a library that can't be created stops the run and names it. A card run has no retry or skip to wait on: awaitCheckpointRetry throws there. With the staging script the run failed with that internal error instead.
Run from the card, libraries that can't be listed stop the run before anything is created. A list that can't be read when checking a library just made counts as "not found yet" and is retried. The setup used to treat an unreadable list as empty, which on a configured server would make every library again. (Codex finding)
Run from the card, a wrong login says to run it again with the original username and password. The old text offered a Skip, which card runs don't have.
script.version is bumped (Jellyfin 2.2.0, Emby 2.2.0), with change logs. Emby is already on the v6 format on staging (#75), which card actions need.

The install-time behaviour is unchanged apart from optional: retry and skip on a failed library, and the old message for a wrong login.

⚠️ Known limits

  • Not run end to end on a HexOS box. Checked instead:
    • the platform's own parser on both files, from origin/staging;
    • the scripts against real Jellyfin 10.10.7 and Emby 4.8.11 containers (below).
  • No screenshots. The card button is existing deck UI that appears from catalog data. Showing it needs dev main synced to this branch and a box with Jellyfin installed. I can do that if you want shots.
  • The card's status line doesn't say the install-time setup was skipped. It shows the hook's description and "Run" until a card run succeeds.
  • An install-time run still treats an unreadable library list as empty. On a fresh install that list is empty anyway.
  • _knowledge/features/apps.md in the platform repo says Plex's hook is already a lifecycle hook and a card action, and its example still writes userOptional.label. That is a separate docs fix there.

✅ Verification

Check Result
bun _lib/validate.ts (55 scripts) and _lib typecheck, after merging staging (#75) ✅ 0 errors, 0 warnings
tsc --strict on both hook scripts (CI's typecheck covers only _lib) ✅
Platform appsInstallScriptSchema, parseAppHooksV6 and runnableHooksFromScript at origin/staging on both files: valid, user-triggerable, lifecycle onAfterInstall, optional, surfaces ["card"], consent label from title ✅
Jellyfin 10.10.7 container, card run, /videos missing: wizard done, 4 libraries made, then stops naming Videos ✅
Same server, card run with a wrong login: "Run Pre-configure Jellyfin again with the original username and password" ✅
Same server, install run with /videos missing: Videos skipped, completes (unchanged) ✅
/videos added, card run again: only Videos is made, completes ✅
Staging's script, same card run: fails with "awaitCheckpointRetry is not available in action runs" ✅ reproduces the problem
The same runs on an Emby 4.8.11 container ✅
Both scripts again after merging staging: card run stops at the missing library, card rerun completes, install run completes ✅
Codex adversarial review: 2 findings, both verified and fixed (a card run kept making libraries past its timeout; an unreadable library list counted as empty) ✅
End-to-end install on a HexOS box ⚠️ not run

An unanswered username and password prompt failed the whole install after
10 minutes, though the app was installed and running. Both setup hooks are
now optional, as Plex's is, so the install completes, and they are also
card actions ("Pre-configure Jellyfin", "Pre-configure Emby") to run later.
Emby moves to the v6 install script format, which card actions need.

Run from the card, a hook has no retry or skip to wait on: a library it
cannot create stops the run with its name, libraries it cannot list stop it
before anything is created, and a wrong login says to run it again.
@eschultz
eschultz merged commit e02d22e into staging Oct 17, 2026
1 check passed
@eschultz
eschultz deleted the fix/media-server-setup-optional branch October 17, 2026 05:47
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