Add ACE-Step music generation to the studio and library.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 23:58:18 -05:00
co-authored by Cursor
parent c79cca39ae
commit 5555155884
25 changed files with 2157 additions and 44 deletions
@@ -0,0 +1,19 @@
import { existsSync } from 'node:fs'
import { sendPathWithRange } from '~/server/utils/httpRange'
import { musicContentType } from '~/utils/music'
export default defineEventHandler((event) => {
const { owner } = assertLibraryOwner(event)
const id = String(getRouterParam(event, 'id') || '')
const track = getTrack(owner, id)
assertFolderAccess(event, track.folderId)
const path = trackAudioPath(owner, track.id, track.ext)
if (!existsSync(path)) {
throw createError({ statusCode: 404, statusMessage: 'Audio file is missing' })
}
const ext = track.ext || 'flac'
return sendPathWithRange(event, path, musicContentType(ext), {
'Content-Disposition': `inline; filename="${safeDownloadName(track.name)}.${ext}"`,
'Cache-Control': 'private, max-age=0, must-revalidate'
})
})