Documentation
¶
Overview ¶
Package config loads server settings from flags and environment variables.
Index ¶
- Variables
- type Config
- func (c Config) BackupDir() string
- func (c Config) Database() string
- func (c Config) DownloadDir() string
- func (c Config) ImageDir() string
- func (c Config) LevelsDir() string
- func (c Config) LyricsDir() string
- func (c Config) PluginDir() string
- func (c Config) RemoteDir() string
- func (c Config) SubtitleDir() string
- func (c Config) ThemeDir() string
- func (c Config) ThumbnailDir() string
- func (c Config) TranscodeDir() string
Constants ¶
This section is empty.
Variables ¶
var DefaultTMDBKey = ""
DefaultTMDBKey is the project's own TMDB key, linked into official builds with -ldflags "-X github.com/yeixio/matinee/internal/config.DefaultTMDBKey=...", so posters work without users registering a key. MATINEE_TMDB_KEY overrides it.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Addr string // HTTP listen address
DataDir string // SQLite database (when used), image cache and transcode scratch space
FFmpegPath string // ffmpeg binary
FFprobePath string // ffprobe binary
ScanInterval time.Duration // periodic library rescan; 0 disables it
WatchPoll time.Duration // how often folders on network shares are checked for new files
TMDBKey string // themoviedb.org API key or read token; empty disables online metadata
RatingCountry string // whose age ratings to use, such as US or GB
DatabaseURL string // postgres:// URL; empty uses SQLite in DataDir
MediaRoot string // where the folder picker starts when adding a library
MusicBrainz bool // look up artists and albums on MusicBrainz (no key needed)
OpenLibrary bool // look up audiobook covers and author photos on Open Library (no key needed)
Wikidata bool // look up movies' and shows' awards on Wikidata (no key needed)
Discovery bool // announce the server on the local network so the apps find it
ServerName string // the name the apps show for this server
PublicURL string // the address the apps should connect to; empty uses this host's IP and port
HomeAddr string // a second listen address only for the home network; empty means Addr serves both
RemoteAddr string // HTTPS listen address for remote access (internal/remote); empty means the server doesn't offer it
ConnectURL string // the service the apps find this server through when its address changes (internal/connect); empty for none
BillingURL string // where that service's subscription is bought; empty for a service that needs none
Plugins bool // run plugins (internal/plugin)
// PodcastsHomeNetwork lets podcast feeds and episodes come from the home
// network too, not only the internet.
PodcastsHomeNetwork bool
PluginCatalog string // where the list of official plugins is; empty for none
// On SIGTERM the server first tells players it's restarting and waits
// DrainDelay (so a load balancer stops sending it requests), then gives
// requests in flight up to ShutdownTimeout to finish.
DrainDelay time.Duration
ShutdownTimeout time.Duration
}
func (Config) BackupDir ¶ added in v0.2.0
BackupDir holds copies of a SQLite database (internal/backup).
func (Config) DownloadDir ¶
func (Config) LyricsDir ¶ added in v0.1.13
LyricsDir keeps what LRCLIB said about songs (internal/lyrics).
func (Config) PluginDir ¶ added in v0.1.1
PluginDir holds installed plugins and what they keep (internal/plugin).
func (Config) SubtitleDir ¶
func (Config) ThumbnailDir ¶ added in v0.1.11
ThumbnailDir holds the seek bar's pictures of each video (internal/thumbs).