remove globals

This commit is contained in:
sentriz
2020-05-03 04:43:00 +01:00
parent 9bf80f4b18
commit ee9335f71e
11 changed files with 188 additions and 163 deletions

View File

@@ -72,7 +72,7 @@ func serveTrackRaw(w http.ResponseWriter, r *http.Request, opts serveTrackOption
}
func serveTrackEncode(w http.ResponseWriter, r *http.Request, opts serveTrackOptions) {
profile := encode.Profiles[opts.pref.Profile]
profile := encode.Profiles()[opts.pref.Profile]
bitrate := encode.GetBitrate(opts.maxBitrate, profile)
trackPath := path.Join(opts.musicPath, opts.track.RelPath())
cacheKey := encode.CacheKey(trackPath, opts.pref.Profile, bitrate)

View File

@@ -7,7 +7,7 @@ import (
"go.senan.xyz/gonic/version"
)
var (
const (
apiVersion = "1.9.0"
xmlns = "http://subsonic.org/restapi"
)