Fix #495: use custom user-agent instead of go-http-client

This commit is contained in:
Drew Weymouth
2024-10-17 08:36:00 -07:00
parent 3fd3c402e9
commit 58ebd3ccf4
5 changed files with 18 additions and 8 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ func (a *App) VersionTag() string {
return a.appVersionTag
}
func StartupApp(appName, displayAppName, appVersionTag, latestReleaseURL string) (*App, error) {
func StartupApp(appName, displayAppName, appVersion, appVersionTag, latestReleaseURL string) (*App, error) {
var confDir, cacheDir string
portableMode := false
if p := checkPortablePath(); p != "" {
@@ -118,7 +118,7 @@ func StartupApp(appName, displayAppName, appVersionTag, latestReleaseURL string)
return nil, err
}
a.ServerManager = NewServerManager(appName, a.Config, !portableMode /*use keyring*/)
a.ServerManager = NewServerManager(appName, appVersion, a.Config, !portableMode /*use keyring*/)
a.PlaybackManager = NewPlaybackManager(a.bgrndCtx, a.ServerManager, a.LocalPlayer, &a.Config.Scrobbling, &a.Config.Transcoding, &a.Config.Application)
a.ImageManager = NewImageManager(a.bgrndCtx, a.ServerManager, cacheDir)
a.Config.Application.MaxImageCacheSizeMB = clamp(a.Config.Application.MaxImageCacheSizeMB, 1, 500)