Safer ffmpeg kill, POST process/service actions, ARM encoder from hardware.env, filter_threads scaling

Made-with: Cursor
This commit is contained in:
eric
2026-03-28 12:03:13 -05:00
parent f4794e720a
commit 9b6570d06e
7 changed files with 204 additions and 45 deletions

View File

@@ -480,9 +480,11 @@ export default function Home() {
if (!currentProcess) return;
setBusy(`process:${action}`);
try {
const data = await fetchJson<ProcessStatusResponse>(
`/${action}?process=${encodeURIComponent(currentProcess)}`,
);
const data = await fetchJson<ProcessStatusResponse>(`/${action}`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ process: currentProcess }),
});
notify(String(data.output || data.pm2_output || data.message || "OK"));
await refreshProcess();
} catch (reason) {
@@ -495,9 +497,11 @@ export default function Home() {
const serviceAction = async (serviceId: string, action: "start" | "restart" | "stop") => {
setBusy(`${serviceId}:${action}`);
try {
const data = await fetchJson<ServiceItem>(
`/service_action?service=${encodeURIComponent(serviceId)}&action=${encodeURIComponent(action)}`,
);
const data = await fetchJson<ServiceItem>("/service_action", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ service: serviceId, action }),
});
notify(data.message || "OK");
await refreshServices();
} catch (reason) {