Files
av1dae/pkg/types/types.go
T
Esa Kataja f39f5b1b16 add: SQLite-backed structured logging with retention
Replace JSON/file logging with a logs.db (WAL) store. Thread the logger
through the encoder and metadata client for debug instrumentation of every
ffmpeg/ffprobe/opusenc invocation and OMDb/TVmaze request. API keys are
redacted before request URLs are logged. Retention defaults to 7 days,
overridable via log_retention_days in config.
2026-06-21 17:08:23 +03:00

60 lines
1.2 KiB
Go

package types
type MediaType string
const (
MediaTypeDVD MediaType = "DVD"
MediaTypeBluRay MediaType = "Blu-ray"
MediaTypeWebDL MediaType = "WebDL"
MediaTypeTVRip MediaType = "TVRip"
)
type Job struct {
InputPath string
OutputPath string
MediaType MediaType
Metadata *Metadata
CRF int
Preset int
DeleteOrigin bool
}
type Metadata struct {
Title string
Collection string
Season string
Episode string
DateReleased string
IMDBID string
TVMazeID string
OriginalMedia MediaType
IsSeries bool
}
type Config struct {
OMDBAPIKey string `yaml:"omdb_api_key"`
LogRetentionDays int `yaml:"log_retention_days"`
Encoding EncodingConfig
Paths PathsConfig
}
type EncodingConfig struct {
DVD EncodingParams `yaml:"dvd"`
Bluray EncodingParams `yaml:"bluray"`
WebDL EncodingParams `yaml:"webdl"`
TVRip EncodingParams `yaml:"tvrip"`
}
type EncodingParams struct {
CRF int `yaml:"crf"`
Preset int `yaml:"preset"`
}
type PathsConfig struct {
Input string `yaml:"input"`
Output string `yaml:"output"`
Originals string `yaml:"originals"`
Failed string `yaml:"failed"`
Work string `yaml:"work"`
}