add: add types and config package
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type MediaType string
|
||||
|
||||
const (
|
||||
MediaTypeDVD MediaType = "DVD"
|
||||
MediaTypeBluRay MediaType = "Blu-ray"
|
||||
)
|
||||
|
||||
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"`
|
||||
Encoding EncodingConfig
|
||||
Paths PathsConfig
|
||||
}
|
||||
|
||||
type EncodingConfig struct {
|
||||
DVD EncodingParams `yaml:"dvd"`
|
||||
Bluray EncodingParams `yaml:"bluray"`
|
||||
}
|
||||
|
||||
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"`
|
||||
}
|
||||
|
||||
type LogEntry struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Level string `json:"level"`
|
||||
Message string `json:"message"`
|
||||
File string `json:"file,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user