mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-05 05:28:37 +01:00
The resolver field only needs to find the working URL — the Jellyseerr version requirement is irrelevant there and only polluted the UI. - jellyseerrProbe: validate reachability + that it's a jellyseerr (no version gate, no version-too-low outcome). - Drop the version-too-low reason from the whole resolver stack (types, resolve, hook, status text, i18n). - Min version 2.0.0 stays enforced in JellyseerrApi.test() at login: now writes an error log + toast, and uses numeric isVersionBelow (fixes the "2.10.0" < "2.0.0" string-compare bug).
16 lines
540 B
TypeScript
16 lines
540 B
TypeScript
/** Result of probing a single candidate URL for a specific service. */
|
|
export type ServerProbeOutcome =
|
|
| { status: "ok"; meta?: Record<string, unknown> }
|
|
| { status: "wrong-service" }
|
|
| { status: "unreachable" };
|
|
|
|
/**
|
|
* Validates one fully-qualified candidate URL for a given service.
|
|
* Implementations must resolve (never reject) — map errors to "unreachable".
|
|
* The provided signal is aborted on timeout or cancellation.
|
|
*/
|
|
export type ServerProbe = (
|
|
url: string,
|
|
signal: AbortSignal,
|
|
) => Promise<ServerProbeOutcome>;
|