diff --git a/package.json b/package.json
index ccb95c6..c6b7fe7 100644
--- a/package.json
+++ b/package.json
@@ -38,5 +38,8 @@
"node-fetch": "^3.3.2",
"web-push": "^3.6.7",
"youtube-transcript": "^1.3.1"
+ },
+ "allowScripts": {
+ "better-sqlite3@12.9.0": true
}
}
diff --git a/src/routes/jobs/+page.svelte b/src/routes/jobs/+page.svelte
index 89eec9f..93021f9 100644
--- a/src/routes/jobs/+page.svelte
+++ b/src/routes/jobs/+page.svelte
@@ -4,7 +4,6 @@
import { getDisplayJobProgress, getJobStatusColor, getJobStatusLabel, isTerminalJobStatus } from '$lib/job-progress.js';
import SourceIcon from '$lib/components/SourceIcon.svelte';
import Waveform from '$lib/components/Waveform.svelte';
- import JobErrorLine from '$lib/components/JobErrorLine.svelte';
import { accent } from '$lib/accent.js';
const ACCENT = $derived($accent.value);
@@ -34,27 +33,23 @@
loading = false;
});
- async function deleteJobById(jobId: string) {
- const job = jobs.find((j) => j.id === jobId);
- if (!job) return;
- if (!confirm(`Delete "${job.title || job.id}"?`)) return;
- const res = await fetch(`/api/jobs/${jobId}`, { method: 'DELETE' });
- if (res.ok) jobs = jobs.filter((j) => j.id !== jobId);
- }
-
async function deleteJob(e: MouseEvent, job: Job) {
e.preventDefault();
e.stopPropagation();
- await deleteJobById(job.id);
+ if (!confirm(`Delete "${job.title || job.id}"?`)) return;
+ const res = await fetch(`/api/jobs/${job.id}`, { method: 'DELETE' });
+ if (res.ok) jobs = jobs.filter((j) => j.id !== job.id);
}
- async function retryJobById(jobId: string) {
- const res = await fetch(`/api/jobs/${jobId}/retry`, { method: 'POST' });
+ async function retryJob(e: MouseEvent, job: Job) {
+ e.preventDefault();
+ e.stopPropagation();
+ const res = await fetch(`/api/jobs/${job.id}/retry`, { method: 'POST' });
if (res.ok) {
- const updated = await fetch(`/api/jobs/${jobId}`);
+ const updated = await fetch(`/api/jobs/${job.id}`);
if (updated.ok) {
const j = await updated.json();
- jobs = jobs.map((x) => (x.id === jobId ? j : x));
+ jobs = jobs.map((x) => (x.id === job.id ? j : x));
}
} else {
const body = await res.json().catch(() => ({}));
@@ -104,15 +99,11 @@
·
{job.audioMode}
{/if}
+ {#if ['failed', 'cancelled'].includes(job.status) && job.error}
+ ·
+ {job.error}
+ {/if}
- {#if ['failed', 'cancelled'].includes(job.status)}
-