models.go
⎇
Raw
1package models
2
3import (
4 "database/sql"
5 "time"
6)
7
8type Preset struct {
9 ID int64
10 Name string
11 Description string
12 IsDefault bool
13 FormatMode string
14 Format string
15 Quality string
16 CustomFormat string
17 ExtractAudio bool
18 AudioFormat string
19 EmbedSubs bool
20 SubLangs string
21 EmbedThumbnail bool
22 EmbedMetadata bool
23 WriteInfoJSON bool
24 OutputTemplate string
25 CustomFlags string
26 CreatedAt time.Time
27}
28
29type Media struct {
30 ID int64
31 URL string
32 Title string
33 Description string
34 Duration int
35 Filepath string
36 RelativePath string
37 IsAudio bool
38 HasEmbeddedThumbnail bool
39 InfoJSONPath string
40 PlaylistID sql.NullString
41 PlaylistIndex sql.NullInt64
42 CreatedAt time.Time
43}
44
45type Download struct {
46 ID int64
47 URL string
48 Status string
49 ProgressPercent int
50 CurrentSpeed string
51 ETA string
52 Logs string
53 ErrorMessage string
54 PresetID sql.NullInt64
55 FormatOverride string
56 CustomFlags string
57 StartedAt sql.NullTime
58 CompletedAt sql.NullTime
59 CreatedAt time.Time
60}
61
62type Settings struct {
63 RefreshInterval int
64 AutoRefreshLibrary bool
65 AutoRefreshDownloads bool
66}
67
68type FormatInfo struct {
69 ID string
70 Ext string
71 Resolution string
72 FPS string
73 Channels string
74 FileSize string
75 Codec string
76 Note string
77}
78