Replace Comfy YuE with standalone YuEGP profile 1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export type JobStatus = 'queued' | 'uploading' | 'running' | 'complete' | 'error' | 'cancelled' | 'deferred'
|
||||
|
||||
export interface JobEvent {
|
||||
audioExt?: string
|
||||
type: string
|
||||
message?: string
|
||||
progress?: number
|
||||
@@ -31,6 +32,7 @@ export interface JobEvent {
|
||||
}
|
||||
|
||||
export interface Job {
|
||||
yueGp?: boolean
|
||||
musicActivity?: { checkedAt: number; running: boolean }
|
||||
id: string
|
||||
kind?: 'video' | 'edit' | 'music'
|
||||
@@ -50,6 +52,7 @@ export interface Job {
|
||||
hideThumbnail?: boolean
|
||||
imageComfyHost?: string
|
||||
library?: {
|
||||
yueProfile?: 1 | 3
|
||||
ownerKey: string
|
||||
folderId: string
|
||||
hideThumbnail: boolean
|
||||
@@ -150,6 +153,12 @@ export function createJob(kind: Job['kind'] = 'video'): Job {
|
||||
return job
|
||||
}
|
||||
|
||||
export function restoreMusicJob(record: Pick<Job, 'id' | 'clientId' | 'startedAt' | 'library' | 'trackId'>) {
|
||||
const job: Job = { ...record, yueGp: true, kind: 'music', status: 'running', message: 'Reconnecting to YuEGP', progress: 0, step: 0, maxStep: 0, events: [], listeners: new Set() }
|
||||
jobs.set(job.id, job)
|
||||
return job
|
||||
}
|
||||
|
||||
export function getJob(id: string) {
|
||||
return jobs.get(id)
|
||||
}
|
||||
@@ -195,6 +204,7 @@ export function jobSnapshot(job: Job) {
|
||||
kind: job.kind || 'video',
|
||||
engine: job.library?.engine,
|
||||
musicActivity: job.musicActivity,
|
||||
audioExt: job.library?.audioExt,
|
||||
type: 'snapshot' as const,
|
||||
status: job.status,
|
||||
message: job.message,
|
||||
|
||||
Reference in New Issue
Block a user