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 Logs sql.NullString
50 ErrorMessage sql.NullString
51 PresetID sql.NullInt64
52 FormatOverride string
53 CustomFlags string
54 OutputDir sql.NullString
55 StartedAt sql.NullTime
56 CompletedAt sql.NullTime
57 CreatedAt time.Time
58}
59
60type Settings struct {
61 RefreshInterval int
62 AutoRefreshLibrary bool
63 AutoRefreshDownloads bool
64 Cookies string
65}
66
67type FormatInfo struct {
68 ID string
69 Ext string
70 Resolution string
71 FPS string
72 Channels string
73 FileSize string
74 Codec string
75 Note string
76}
77
78type SubtitleTrack struct {
79 Lang string
80 Label string
81 Src string
82}
83