Documentation
¶
Overview ¶
Package config provides configuration loading for outtake.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// ListenAddr is the address the server listens on.
ListenAddr string `mapstructure:"listen-addr"`
// DatabasePath is the path to the database file.
DatabasePath string `mapstructure:"database-path"`
// DatabaseBackend selects sqlite (default) or postgres/pgx.
DatabaseBackend string `mapstructure:"database-backend"`
// DatabaseURL is the Postgres DSN when DatabaseBackend is postgres.
DatabaseURL string `mapstructure:"database-url"`
// StoragePath is the path to the storage directory.
StoragePath string `mapstructure:"storage-path"`
// StorageBackend selects filesystem (default) or s3.
StorageBackend string `mapstructure:"storage-backend"`
// S3Endpoint is the S3-compatible API endpoint.
S3Endpoint string `mapstructure:"s3-endpoint"`
// S3Bucket is the target bucket.
S3Bucket string `mapstructure:"s3-bucket"`
// S3Region is the S3 region.
S3Region string `mapstructure:"s3-region"`
// S3AccessKey is the static access key.
S3AccessKey string `mapstructure:"s3-access-key"`
// S3SecretKey is the static secret key.
S3SecretKey string `mapstructure:"s3-secret-key"`
// S3UsePathStyle forces path-style URLs for S3-compatible stores.
S3UsePathStyle bool `mapstructure:"s3-use-path-style"`
// FFmpegPath is the path to FFmpeg.
FFmpegPath string `mapstructure:"ffmpeg-path"`
// FFprobePath is the path to FFprobe.
FFprobePath string `mapstructure:"ffprobe-path"`
// LogLevel is the log level.
LogLevel string `mapstructure:"log-level"`
// Env is the environment.
Env string `mapstructure:"env"`
// SessionPollSec is the session poll interval in seconds.
SessionPollSec int `mapstructure:"session-poll-sec"`
// NumWorkers is the number of workers.
NumWorkers int `mapstructure:"num-workers"`
// MaxClipDurSec is the maximum clip duration in seconds.
MaxClipDurSec int `mapstructure:"max-clip-dur-sec"`
// CropBlackBars is the default for trimming letterbox/pillarbox bars.
CropBlackBars bool `mapstructure:"crop-black-bars"`
// WebSafeColor is the default for HDR tone-mapping on saved clips.
WebSafeColor bool `mapstructure:"web-safe-color"`
// PlexServerURL is the Plex server URL.
PlexServerURL string `mapstructure:"plex-server-url"`
// PlexToken is the Plex token.
PlexToken string `mapstructure:"plex-token"`
// PlexClientID is the Plex client ID.
PlexClientID string `mapstructure:"plex-client-id"`
// PublicBaseURL is the externally reachable base URL for Plex callbacks.
PublicBaseURL string `mapstructure:"public-base-url"`
// PlexMediaRoot is the media path prefix as reported by Plex.
PlexMediaRoot string `mapstructure:"plex-media-root"`
// LocalMediaRoot is the local path prefix that replaces PlexMediaRoot.
LocalMediaRoot string `mapstructure:"local-media-root"`
}
Config represents the application configuration.
func (*Config) RemapMediaPath ¶
RemapMediaPath maps a Plex filesystem path onto the local mount.
When only LocalMediaRoot is set, the Plex path is joined under that mount. That covers servers that report library roots such as /Movies or /TV.
Click to show internal directories.
Click to hide internal directories.