0.2.65 - End Credits wiring / Gateway: 0.1.45 - Credits
This commit is contained in:
@@ -22,6 +22,22 @@ type Config struct {
|
||||
// Defaults to EmbyURL; set it when the gateway talks to Emby over a network the
|
||||
// TVs cannot reach.
|
||||
EmbyPublicURL string
|
||||
// EmbyMediaURL is the address the gateway reads *media bytes* from, which is a
|
||||
// different question from how it reads metadata and is the only place the difference
|
||||
// costs anything.
|
||||
//
|
||||
// Credits detection is the one thing on the server side that opens a media file, and it
|
||||
// does so with ranged reads over HTTP. A metadata call is a few kilobytes and does not
|
||||
// care which way it is routed; a scan is megabytes, and where EmbyURL is a public
|
||||
// hostname — which it legitimately may be, since the gateway and Emby need not share a
|
||||
// network — every one of those ranged reads leaves the host for the internet-facing
|
||||
// edge, pays TLS, and comes back in through a reverse proxy that is free to buffer the
|
||||
// response and discard the range economy entirely.
|
||||
//
|
||||
// So this is stated separately rather than inferred: there is no way to look at a URL
|
||||
// and tell whether it happens to resolve locally. Unset, it falls back to EmbyURL and
|
||||
// nothing changes.
|
||||
EmbyMediaURL string
|
||||
|
||||
DatabaseURL string
|
||||
RedisURL string
|
||||
@@ -191,6 +207,7 @@ func Load() (Config, error) {
|
||||
ListenAddr: env("MEMBY_LISTEN_ADDR", ":8080"),
|
||||
EmbyURL: strings.TrimRight(os.Getenv("MEMBY_EMBY_URL"), "/"),
|
||||
EmbyPublicURL: strings.TrimRight(os.Getenv("MEMBY_EMBY_PUBLIC_URL"), "/"),
|
||||
EmbyMediaURL: strings.TrimRight(os.Getenv("MEMBY_EMBY_MEDIA_URL"), "/"),
|
||||
DatabaseURL: os.Getenv("MEMBY_DATABASE_URL"),
|
||||
RedisURL: env("MEMBY_REDIS_URL", "redis://localhost:6379/0"),
|
||||
ClientName: env("MEMBY_CLIENT_NAME", "MbyATV"),
|
||||
@@ -262,6 +279,9 @@ func Load() (Config, error) {
|
||||
if c.EmbyPublicURL == "" {
|
||||
c.EmbyPublicURL = c.EmbyURL
|
||||
}
|
||||
if c.EmbyMediaURL == "" {
|
||||
c.EmbyMediaURL = c.EmbyURL
|
||||
}
|
||||
if c.ReleasePublishToken != "" && c.PublicURL == "" {
|
||||
return c, fmt.Errorf("MEMBY_PUBLIC_URL is required when release publishing is enabled")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user