0.2.55 - Remote config/Request fixes
This commit is contained in:
@@ -45,6 +45,9 @@ type Config struct {
|
||||
RecommendTimeout time.Duration
|
||||
// RecommendationWeights is an optional JSON overlay on the weighted defaults.
|
||||
RecommendationWeights string
|
||||
// RemoteConfig is the complete, validated presentation document served to TVs.
|
||||
// It is app-scoped and intentionally contains no account, playback or routing state.
|
||||
RemoteConfig RemoteConfig
|
||||
|
||||
UpstreamTimeout time.Duration
|
||||
|
||||
@@ -138,6 +141,10 @@ type Config struct {
|
||||
}
|
||||
|
||||
func Load() (Config, error) {
|
||||
remoteConfig, err := loadRemoteConfig(os.Getenv("MEMBY_REMOTE_CONFIG_JSON"))
|
||||
if err != nil {
|
||||
return Config{}, err
|
||||
}
|
||||
c := Config{
|
||||
ListenAddr: env("MEMBY_LISTEN_ADDR", ":8080"),
|
||||
EmbyURL: strings.TrimRight(os.Getenv("MEMBY_EMBY_URL"), "/"),
|
||||
@@ -156,6 +163,7 @@ func Load() (Config, error) {
|
||||
RecommendationWeights: strings.TrimSpace(
|
||||
os.Getenv("MEMBY_RECOMMENDATION_WEIGHTS"),
|
||||
),
|
||||
RemoteConfig: remoteConfig,
|
||||
|
||||
AdminToken: strings.TrimSpace(os.Getenv("MEMBY_ADMIN_TOKEN")),
|
||||
PublicURL: strings.TrimRight(strings.TrimSpace(os.Getenv("MEMBY_PUBLIC_URL")), "/"),
|
||||
|
||||
Reference in New Issue
Block a user