Skip to content

Commit

Permalink
Dynamically set connect player name
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Crane <[email protected]>
  • Loading branch information
marcus-crane committed Sep 12, 2024
1 parent f2b597b commit ab3cc8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ type ReadwiseConfig struct {
}

type SpotifyConfig struct {
ClientId string `env:"SPOTIFY_CLIENT_ID"`
ClientSecret string `env:"SPOTIFY_CLIENT_SECRET"`
DeviceId string `env:"SPOTIFY_DEVICE_ID"`
RedirectUri string `env:"SPOTIFY_REDIRECT_URI"`
Username string `env:"SPOTIFY_USERNAME"`
ConnectPlayerName string `env:"SPOTIFY_CONNECT_PLAYER_NAME"`
ClientId string `env:"SPOTIFY_CLIENT_ID"`
ClientSecret string `env:"SPOTIFY_CLIENT_SECRET"`
DeviceId string `env:"SPOTIFY_DEVICE_ID"`
RedirectUri string `env:"SPOTIFY_REDIRECT_URI"`
Username string `env:"SPOTIFY_USERNAME"`
}

type SteamConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion spotify/spotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func (c *Client) handleMessage(msg dealer.Message, ps *playback.PlaybackSystem)
PutStateReason: connectpb.PutStateReason_NEW_DEVICE,
Device: &connectpb.Device{
DeviceInfo: &connectpb.DeviceInfo{
Name: "Gunslinger",
Name: c.cfg.Spotify.ConnectPlayerName,
Volume: 0,
CanPlay: false,
DeviceType: devicespb.DeviceType_SMARTWATCH,
Expand Down

0 comments on commit ab3cc8e

Please sign in to comment.