diff --git a/config.gcfg b/config.gcfg index 8cbb259..78d2223 100644 --- a/config.gcfg +++ b/config.gcfg @@ -34,6 +34,10 @@ MaxSongPerPlaylist = 50 # Default Value: false AutomaticShuffleOn = false +# Announce song information at start of track +# Default Value: true +AnnounceNewTrack = true + [Cache] # Cache songs as they are downloaded? diff --git a/parseconfig.go b/parseconfig.go index 7dbfddd..ae933ea 100644 --- a/parseconfig.go +++ b/parseconfig.go @@ -24,6 +24,7 @@ type DjConfig struct { MaxSongDuration int MaxSongPerPlaylist int AutomaticShuffleOn bool + AnnounceNewTrack bool } Cache struct { Enabled bool diff --git a/youtube_dl.go b/youtube_dl.go index 20a2eea..ff39510 100644 --- a/youtube_dl.go +++ b/youtube_dl.go @@ -91,8 +91,9 @@ func (dl *AudioTrack) Play() { if !isNil(dl.playlist) { message = fmt.Sprintf(message+`From playlist "%s"`, dl.Playlist().Title()) } - dj.client.Self.Channel.Send(message+``, false) - + if dj.conf.General.AnnounceNewTrack { + dj.client.Self.Channel.Send(message+``, false) + } go func() { dj.audioStream.Wait() dj.queue.OnSongFinished()