package models import ( "database/sql" "time" ) type Preset struct { ID int64 Name string Description string IsDefault bool FormatMode string Format string Quality string CustomFormat string ExtractAudio bool AudioFormat string EmbedSubs bool SubLangs string EmbedThumbnail bool EmbedMetadata bool WriteInfoJSON bool WriteComments bool CommentSort string MaxComments int CommentExtractorArgs string CustomFlags string CreatedAt time.Time } type LibraryItem struct { Name string RelPath string DirPath string SourceURL string Duration int Description string YtdlpFlags string MediaFiles []MediaFile } type MediaFile struct { Filename string Filepath string IsAudio bool Duration int } type Download struct { ID int64 URL string Status string Logs sql.NullString ErrorMessage sql.NullString PresetID sql.NullInt64 FormatOverride string CustomFlags string OutputDir sql.NullString SubscriptionID sql.NullInt64 StartedAt sql.NullTime CompletedAt sql.NullTime CreatedAt time.Time } // Subscription is a saved URL that the scheduler re-downloads on a recurring // schedule. Each subscription owns its OutputDir: refresh/dedup and pruning are // scoped to that directory (see service.DownloadService refresh modes). type Subscription struct { ID int64 Name string URL string Enabled bool RefreshMode string // "overwrite" | "skip" | "metadata" ScheduleKind string // "hourly" | "daily" | "weekly" | "monthly" | "cron" CronExpr string PresetID sql.NullInt64 FormatOverride string CustomFlags string OutputDir string PruneRemoved bool LastRunAt sql.NullTime NextRunAt sql.NullTime LastStatus sql.NullString CreatedAt time.Time } type Settings struct { RefreshInterval int AutoRefreshLibrary bool AutoRefreshDownloads bool Cookies string } type FormatInfo struct { ID string Ext string Resolution string FPS string Channels string FileSize string Codec string Note string } type SubtitleTrack struct { Lang string Label string Src string } type Comment struct { ID string Parent string Author string Text string Timestamp int64 TimeText string LikeCount int AuthorIsUploader bool ReplyTo string Depth int } type HeatmapSegment struct { StartTime float64 EndTime float64 Value float64 Width float64 Height float64 } type ItemMetadata struct { Name string `toml:"name"` SourceURL string `toml:"source_url"` Description string `toml:"description"` VideoID string `toml:"video_id"` YtdlpFlags string `toml:"ytdlp_flags"` FileDurations map[string]int `toml:"file_durations"` }