Added AnnounceNewTrack config bool
Added a new boolean named AnnounceNewTrack that has the ability to disable the song information upon playing the track.
This commit is contained in:
parent
cd24a79e1f
commit
3ebb51fbcd
|
@ -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?
|
||||
|
|
|
@ -24,6 +24,7 @@ type DjConfig struct {
|
|||
MaxSongDuration int
|
||||
MaxSongPerPlaylist int
|
||||
AutomaticShuffleOn bool
|
||||
AnnounceNewTrack bool
|
||||
}
|
||||
Cache struct {
|
||||
Enabled bool
|
||||
|
|
|
@ -91,8 +91,9 @@ func (dl *AudioTrack) Play() {
|
|||
if !isNil(dl.playlist) {
|
||||
message = fmt.Sprintf(message+`<tr><td align="center">From playlist "%s"</td></tr>`, dl.Playlist().Title())
|
||||
}
|
||||
dj.client.Self.Channel.Send(message+`</table>`, false)
|
||||
|
||||
if dj.conf.General.AnnounceNewTrack == true {
|
||||
dj.client.Self.Channel.Send(message+`</table>`, false)
|
||||
}
|
||||
go func() {
|
||||
dj.audioStream.Wait()
|
||||
dj.queue.OnSongFinished()
|
||||
|
|
Reference in a new issue