Let queued video, image, and music jobs open in an inspect modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 00:15:02 -05:00
co-authored by Cursor
parent 53990192e4
commit f05f8f3597
12 changed files with 1257 additions and 37 deletions
+9
View File
@@ -1,8 +1,17 @@
import { cancelLiveMusicJob, findInspectJob } from '~/server/utils/queuedInspect'
import { cancelStudioJob } from '~/server/utils/studioQueue'
export default defineEventHandler(async (event) => {
const { owner } = assertLibraryOwner(event)
const id = String(getRouterParam(event, 'id') || '')
const job = findInspectJob(owner, id)
if (!job) {
throw createError({ statusCode: 404, statusMessage: 'Queued job not found' })
}
if (job.source === 'live' && job.kind === 'music') {
await cancelLiveMusicJob(owner, id)
return { ok: true }
}
await cancelStudioJob(owner, id)
return { ok: true }
})