mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 05:37:05 +02:00
Added constants for app name and version, use custom user-agent
This commit is contained in:
parent
f6b4ea4a46
commit
46e6a667c8
10 changed files with 75 additions and 6 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/delucks/go-subsonic"
|
||||
"github.com/spf13/viper"
|
||||
"go.uploadedlobster.com/scotty/internal/models"
|
||||
"go.uploadedlobster.com/scotty/internal/version"
|
||||
)
|
||||
|
||||
type SubsonicApiBackend struct {
|
||||
|
@ -38,7 +39,7 @@ func (b *SubsonicApiBackend) FromConfig(config *viper.Viper) models.Backend {
|
|||
Client: &http.Client{},
|
||||
BaseUrl: config.GetString("server-url"),
|
||||
User: config.GetString("username"),
|
||||
ClientName: "Scotty",
|
||||
ClientName: version.AppName,
|
||||
}
|
||||
b.password = config.GetString("token")
|
||||
return b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue