diff --git a/lib/cfg/init.go b/lib/cfg/init.go index fcb937e..1f57efd 100644 --- a/lib/cfg/init.go +++ b/lib/cfg/init.go @@ -22,7 +22,7 @@ var FullyPreloadTrack = false // proxy images (user avatars, track/playlist covers) var ProxyImages = false -var ImageCacheControl = "max-age=600; public" // browser-side 10 minutes cache by default, only used for proxied images +var ImageCacheControl = "max-age=600, public, immutable" // browser-side 10 minutes cache by default, only used for proxied images // proxy streams (hls playlist files and track parts) var ProxyStreams = false @@ -31,7 +31,7 @@ var ProxyStreams = false // If this setting is set to true, ProxyStreams and FullyPreloadTrack will be ignored (you could count this as a replacement for having both as true, also should be a bit more effective) // You can also easily download the songs this way (right click => save audio as..., the only downside is that there is no metadata) var Restream = false -var RestreamCacheControl = "max-age=600; public" // browser-side 10 minutes cache by default, only used for restreamed songs +var RestreamCacheControl = "max-age=604800, public, immutable" // you shouldn't change this, it won't work the way you think it will (for now, maybe later i will fix it up) // enable /_/info endpoint (shows if some settings are enabled/disabled) var InstanceInfo = true diff --git a/lib/sc/track.go b/lib/sc/track.go index 722396f..f3b9272 100644 --- a/lib/sc/track.go +++ b/lib/sc/track.go @@ -301,7 +301,7 @@ func (t Track) GetStream() (string, error) { return "", ErrNoURL } - if cfg.ProxyStreams { + if cfg.ProxyStreams && !cfg.Restream { return "/_/proxy/streams/playlist?url=" + url.QueryEscape(s.URL), nil }