chore: remove dead machine-level Jellyfin/Jellyseerr fields
Follow-up #1 to the service-registry change. Jellyfin/Jellyseerr now resolve from the service registry, so the machine-level app fields are dead config. - dependencies.py: drop dead _jellyseerr_client_for; simplify _resolve_machine to SSH-only. - settings_store.py + routers/settings.py: remove jellyfin_*/jellyseerr_* from machine default config, get_machine_config, normalization, row mappers, and MachineInput. - frontend types + Settings.tsx: drop the fields and the Jellyfin/Jellyseerr form sections + service options. - Update frontend test fixtures. Existing DB rows may still carry these keys in config_json; they are inert and drop on the next machine save. Verification: backend ruff clean, pytest 222; frontend lint 0 errors, build success, 70 tests.
This commit is contained in:
@@ -52,8 +52,6 @@ import { Textarea } from "@/components/ui/textarea";
|
||||
const SERVICE_OPTIONS = [
|
||||
{ value: "monitoring", label: "Monitoring" },
|
||||
{ value: "files", label: "Files" },
|
||||
{ value: "jellyfin", label: "Jellyfin" },
|
||||
{ value: "jellyseerr", label: "Jellyseerr" },
|
||||
{ value: "nextcloud", label: "Nextcloud" },
|
||||
];
|
||||
|
||||
@@ -114,7 +112,7 @@ function emptyMachine(
|
||||
name: mode === "local" ? "This machine" : "",
|
||||
mode,
|
||||
enabled: true,
|
||||
services: mode === "local" ? ["monitoring", "files", "jellyfin"] : [],
|
||||
services: mode === "local" ? ["monitoring", "files"] : [],
|
||||
host: "",
|
||||
port: 22,
|
||||
username: "",
|
||||
@@ -126,11 +124,6 @@ function emptyMachine(
|
||||
password: "",
|
||||
media_root: "",
|
||||
path_prefix: "",
|
||||
jellyfin_url: "",
|
||||
jellyfin_user_id: "",
|
||||
jellyfin_api_key: "",
|
||||
jellyseerr_url: "",
|
||||
jellyseerr_api_key: "",
|
||||
notes: "",
|
||||
};
|
||||
}
|
||||
@@ -169,8 +162,6 @@ function MachineEditor({
|
||||
const isLocal = draft.mode === "local";
|
||||
const selectedSSHKey = sshKeys.find((key) => key.id === draft.ssh_key_id);
|
||||
const enabledServices = draft.services.length;
|
||||
const hasJellyfin = draft.services.includes("jellyfin");
|
||||
const hasJellyseerr = draft.services.includes("jellyseerr");
|
||||
const placeholderIfSet = (isSet: boolean | undefined) =>
|
||||
isSet ? "Set, not shown" : undefined;
|
||||
return (
|
||||
@@ -398,99 +389,6 @@ function MachineEditor({
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
{hasJellyfin && (
|
||||
<>
|
||||
<div className="col-span-12">
|
||||
<SectionLabel
|
||||
title="Jellyfin"
|
||||
description="Library host and user selection for media browsing."
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Jellyfin URL">
|
||||
<Input
|
||||
value={draft.jellyfin_url}
|
||||
onChange={(e) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
jellyfin_url: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Jellyfin user ID">
|
||||
<Input
|
||||
value={draft.jellyfin_user_id}
|
||||
onChange={(e) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
jellyfin_user_id: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Jellyfin API key">
|
||||
<Input
|
||||
type="password"
|
||||
placeholder={placeholderIfSet(
|
||||
editingMachine?.jellyfin_api_key_set,
|
||||
)}
|
||||
value={draft.jellyfin_api_key}
|
||||
onChange={(e) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
jellyfin_api_key: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{hasJellyseerr && (
|
||||
<>
|
||||
<div className="col-span-12">
|
||||
<SectionLabel
|
||||
title="Jellyseerr"
|
||||
description="Optional request-manager enrichment for users and requests."
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Jellyseerr URL">
|
||||
<Input
|
||||
value={draft.jellyseerr_url}
|
||||
onChange={(e) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
jellyseerr_url: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Jellyseerr API key">
|
||||
<Input
|
||||
type="password"
|
||||
placeholder={placeholderIfSet(
|
||||
editingMachine?.jellyseerr_api_key_set,
|
||||
)}
|
||||
value={draft.jellyseerr_api_key}
|
||||
onChange={(e) =>
|
||||
setDraft((current) => ({
|
||||
...current,
|
||||
jellyseerr_api_key: e.target.value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</FormField>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{isLocal && (
|
||||
<div className="col-span-12 md:col-span-6">
|
||||
<FormField label="Local hint">
|
||||
@@ -538,7 +436,7 @@ function MachineEditor({
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
) : null}
|
||||
{!isLocal && !hasJellyfin && (
|
||||
{!isLocal && enabledServices === 0 && (
|
||||
<Alert>
|
||||
<AlertDescription>
|
||||
SSH machines usually need monitoring or files enabled.
|
||||
@@ -584,13 +482,6 @@ function MachineEditor({
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{hasJellyseerr && !draft.jellyseerr_url && (
|
||||
<Alert>
|
||||
<AlertDescription>
|
||||
Jellyseerr is enabled, but no URL is configured yet.
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
@@ -1146,11 +1037,6 @@ export function Settings() {
|
||||
ssh_private_key_passphrase: "",
|
||||
password: "",
|
||||
media_root: machine.media_root,
|
||||
jellyfin_url: machine.jellyfin_url,
|
||||
jellyfin_user_id: machine.jellyfin_user_id,
|
||||
jellyfin_api_key: "",
|
||||
jellyseerr_url: machine.jellyseerr_url,
|
||||
jellyseerr_api_key: "",
|
||||
notes: machine.notes,
|
||||
},
|
||||
machine,
|
||||
@@ -1237,12 +1123,6 @@ export function Settings() {
|
||||
ssh_private_key_passphrase: "",
|
||||
password: "",
|
||||
media_root: selectedMachine.media_root,
|
||||
jellyfin_url: selectedMachine.jellyfin_url,
|
||||
jellyfin_user_id:
|
||||
selectedMachine.jellyfin_user_id,
|
||||
jellyfin_api_key: "",
|
||||
jellyseerr_url: selectedMachine.jellyseerr_url,
|
||||
jellyseerr_api_key: "",
|
||||
notes: selectedMachine.notes,
|
||||
},
|
||||
selectedMachine,
|
||||
|
||||
@@ -48,11 +48,6 @@ function machine(
|
||||
password_set: false,
|
||||
media_root: "",
|
||||
path_prefix: "",
|
||||
jellyfin_url: "",
|
||||
jellyfin_user_id: "",
|
||||
jellyfin_api_key_set: false,
|
||||
jellyseerr_url: "",
|
||||
jellyseerr_api_key_set: false,
|
||||
notes: "",
|
||||
...overrides,
|
||||
} as MonitoringMachine;
|
||||
|
||||
@@ -30,11 +30,6 @@ function machineFixture(
|
||||
password_set: false,
|
||||
media_root: "",
|
||||
path_prefix: "",
|
||||
jellyfin_url: "",
|
||||
jellyfin_user_id: "",
|
||||
jellyfin_api_key_set: false,
|
||||
jellyseerr_url: "",
|
||||
jellyseerr_api_key_set: false,
|
||||
notes: "",
|
||||
...overrides,
|
||||
};
|
||||
|
||||
@@ -34,11 +34,6 @@ function machineFixture(
|
||||
password_set: false,
|
||||
media_root: "",
|
||||
path_prefix: "",
|
||||
jellyfin_url: "",
|
||||
jellyfin_user_id: "",
|
||||
jellyfin_api_key_set: false,
|
||||
jellyseerr_url: "",
|
||||
jellyseerr_api_key_set: false,
|
||||
notes: "",
|
||||
...overrides,
|
||||
};
|
||||
|
||||
@@ -53,11 +53,6 @@ function localMachine(
|
||||
password_set: false,
|
||||
media_root: "/mnt/media",
|
||||
path_prefix: "",
|
||||
jellyfin_url: "",
|
||||
jellyfin_user_id: "",
|
||||
jellyfin_api_key_set: false,
|
||||
jellyseerr_url: "",
|
||||
jellyseerr_api_key_set: false,
|
||||
notes: "Primary node",
|
||||
...overrides,
|
||||
} as MonitoringMachine;
|
||||
|
||||
@@ -175,11 +175,6 @@ export interface MonitoringMachine {
|
||||
password_set: boolean;
|
||||
media_root: string;
|
||||
path_prefix: string;
|
||||
jellyfin_url: string;
|
||||
jellyfin_user_id: string;
|
||||
jellyfin_api_key_set: boolean;
|
||||
jellyseerr_url: string;
|
||||
jellyseerr_api_key_set: boolean;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
@@ -200,11 +195,6 @@ export interface MonitoringMachineInput {
|
||||
password: string;
|
||||
media_root: string;
|
||||
path_prefix: string;
|
||||
jellyfin_url: string;
|
||||
jellyfin_user_id: string;
|
||||
jellyfin_api_key: string;
|
||||
jellyseerr_url: string;
|
||||
jellyseerr_api_key: string;
|
||||
notes: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user