-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.prisma
More file actions
59 lines (54 loc) · 1.5 KB
/
Copy pathschema.prisma
File metadata and controls
59 lines (54 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Prisma schema for m3u8-downloader
// https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
}
datasource db {
provider = "sqlite"
}
enum DownloadStatus {
PENDING
PROBING
EXTRACTING
DOWNLOADING
COMBINING
CONVERTING
FINALIZING
COMPLETED
FAILED
}
model Download {
id String @id @default(cuid())
title String
url String
/// Page URL used as Referer/Origin when fetching CDN-protected HLS
referer String?
format String @default("mp4")
resolution String?
status DownloadStatus @default(PENDING)
stage String @default("queued")
stageLabel String @default("Queued")
progress Int @default(0)
fileName String?
filePath String?
error String?
fileSize Int?
/// Job kind: hls | all_video
jobType String @default("hls")
/// Backend engine: ffmpeg | downloadm3u8 | ytdlp | direct | extract_hls
engine String?
/// yt-dlp extractor key or classifier engine id
extractor String?
/// Optional absolute path to Netscape cookies.txt for this job
cookiePath String?
/// Download playlist entries (yt-dlp); default single item
playlist Boolean @default(false)
/// yt-dlp format selector e.g. bv*+ba/b or best[height<=1080]
ytdlpFormat String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([status])
@@index([createdAt])
@@index([jobType])
}