This commit is contained in:
2026-08-23 14:13:18 -05:00
parent 789bf91eed
commit 866f243f1b
37 changed files with 1761 additions and 58 deletions
+18 -1
View File
@@ -33,6 +33,17 @@ type Config struct {
// to the outside world.
EnableExternalMetadata bool
// EnableArtistPhotos opts into looking up an artist photo (fanart.tv,
// falling back to Wikidata/Wikimedia Commons) for artists that carry
// a locally-tagged MusicBrainz ID. Off by default for the same
// offline-first reason as EnableExternalMetadata.
EnableArtistPhotos bool
// FanartTVAPIKey is an optional personal API key for fanart.tv,
// tried before the free Wikidata fallback when EnableArtistPhotos is
// on. Empty means "skip fanart.tv".
FanartTVAPIKey string
// PodcastsAllowPrivateNetworks disables SSRF protection on podcast
// feed/enclosure fetching, allowing feeds hosted on loopback/LAN/
// link-local addresses. Off by default: podcast URLs are supplied
@@ -68,10 +79,16 @@ func Load() (Config, error) {
FFprobePath: envOr("VIBESONIC_FFPROBE_PATH", "ffprobe"),
MPVPath: envOr("VIBESONIC_MPV_PATH", "mpv"),
SessionSecret: os.Getenv("VIBESONIC_SESSION_SECRET"),
CookieSecure: envBool("VIBESONIC_COOKIE_SECURE", true),
// The built-in server speaks plain HTTP, so Secure cookies cannot be
// the default: browsers would discard them during first-run setup.
// Deployments terminating TLS at a reverse proxy should opt in.
CookieSecure: envBool("VIBESONIC_COOKIE_SECURE", false),
EnableExternalMetadata: envBool("VIBESONIC_ENABLE_EXTERNAL_METADATA", false),
EnableArtistPhotos: envBool("VIBESONIC_ENABLE_ARTIST_PHOTOS", false),
FanartTVAPIKey: os.Getenv("VIBESONIC_FANART_TV_API_KEY"),
PodcastsAllowPrivateNetworks: envBool("VIBESONIC_PODCASTS_ALLOW_PRIVATE_NETWORKS", false),
}
cfg.DBPath = envOr("VIBESONIC_DB", filepath.Join(cfg.DataDir, "vibesonic.db"))