The download endpoint served files under their internal uuid-based storage name; it now builds the Content-Disposition filename from the probed video title (persisted on submit) with the original extension, falling back to the old behavior when no title is available. The status page also gets an always-visible link back to the homepage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
55 lines
1.1 KiB
Plaintext
55 lines
1.1 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mysql"
|
|
}
|
|
|
|
model Download {
|
|
id String @id @default(cuid())
|
|
uuid String @unique @default(uuid())
|
|
url String @db.Text
|
|
status Status @default(PENDING)
|
|
format String
|
|
quality String
|
|
subtitles Boolean @default(false)
|
|
subtitleLangs String? @db.Text
|
|
clipStart Int?
|
|
clipEnd Int?
|
|
audioQuality String?
|
|
extraArgs String? @db.Text
|
|
title String? @db.Text
|
|
|
|
filePath String? @db.Text
|
|
fileName String?
|
|
fileSize BigInt?
|
|
errorMsg String? @db.Text
|
|
|
|
ipAddress String
|
|
submittedAt DateTime @default(now())
|
|
startedAt DateTime?
|
|
completedAt DateTime?
|
|
deletedAt DateTime?
|
|
|
|
tokens DownloadToken[]
|
|
}
|
|
|
|
model DownloadToken {
|
|
id String @id @default(cuid())
|
|
download Download @relation(fields: [downloadId], references: [id])
|
|
downloadId String
|
|
token String @unique @default(uuid())
|
|
expiresAt DateTime
|
|
usedAt DateTime?
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
enum Status {
|
|
PENDING
|
|
PROCESSING
|
|
DONE
|
|
FAILED
|
|
FILE_DELETED
|
|
}
|