use device name instead of ID

This commit is contained in:
2023-09-26 01:07:01 +02:00
parent 527200abe7
commit 1c9706485c
4 changed files with 28 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ import (
type args struct {
SpotifyClientID string `arg:"--spotify-client-id,required,env:SPOTIFY_CLIENT_ID" placeholder:"SPOTIFY_CLIENT_ID"`
SpotifyClientSecret string `arg:"--spotify-client-secret,required,env:SPOTIFY_CLIENT_SECRET" placeholder:"SPOTIFY_CLIENT_SECRET"`
DeviceID string `arg:"--device-id,required,env:SPOTIFY_DEVICE_ID" placeholder:"SPOTIFY_DEVICE_ID" help:"Can be found later in the API"`
DeviceName string `arg:"--device-name,required,env:SPOTIFY_DEVICE_NAME" placeholder:"SPOTIFY_DEVICE_NAME" help:"Can be found later in the API"`
PlaylistID string `arg:"--playlist-id,required,env:SPOTIFY_PLAYLIST_ID" help:"Just the id" placeholder:"SPOTIFY_PLAYLIST_ID"`
RedirectURL string `arg:"--redirect-url,required,env:SPOTIFY_REDIRECT_URL" help:"Must be the same as in the Spotify developer dashboard." placeholder:"SPOTIFY_REDIRECT_URL"`
ListenAddr string `arg:"--listen-addr,env:LISTEN_ADDR" help:"Address to listen on" placeholder:"LISTEN_ADDR" default:":3000"`
@@ -23,7 +23,7 @@ func main() {
morningalarm.New(morningalarm.MorningAlarmConfig{
SpotifyClientID: args.SpotifyClientID,
SpotifyClientSecret: args.SpotifyClientSecret,
DeviceID: args.DeviceID,
DeviceName: args.DeviceName,
PlaylistID: args.PlaylistID,
RedirectURL: args.RedirectURL,
ListenAddr: args.ListenAddr,