diff --git a/main.go b/main.go index 8b3f9aa..600a706 100644 --- a/main.go +++ b/main.go @@ -15,12 +15,12 @@ import ( "github.com/rs/zerolog/log" ) -// Logic Jellyfin URL +// Logic Jellyfin URL. type Logic struct { BaseURL string } -// PublicInfo Chromecast configuration Payload +// PublicInfo Chromecast configuration Payload. type PublicInfo struct { ID string LocalAddress string @@ -69,8 +69,10 @@ func (l Logic) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + url := os.Getenv("JELLYFIN_URL") jd.LocalAddress = url + nd, err := json.Marshal(jd) if err != nil { logger.Error().Msg(err.Error())