diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-07-31 18:07:41 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-07-31 18:07:41 +0200 |
| commit | 103e473f200b76db20ef8d9af3c98db2bfb2aa29 (patch) | |
| tree | 7f534e839ddd09021186f05a89903c59007c0ed3 /wrms.go | |
| parent | 8205d426e9681abc470dcb2e49344246a01b2e49 (diff) | |
| download | WRMS-103e473f200b76db20ef8d9af3c98db2bfb2aa29.tar.gz WRMS-103e473f200b76db20ef8d9af3c98db2bfb2aa29.zip | |
make time bonus config value usable through yaml
Diffstat (limited to 'wrms.go')
| -rw-r--r-- | wrms.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -85,8 +85,8 @@ func (wrms *Wrms) initConn(conn *Connection) error { initialCmds := []interface{}{} - if wrms.Config.timeBonus != 0 { - ev := map[string]any{"cmd": "timeBonus", "timeBonus": wrms.Config.timeBonus} + if wrms.Config.TimeBonus != 0 { + ev := map[string]any{"cmd": "timeBonus", "timeBonus": wrms.Config.TimeBonus} initialCmds = append(initialCmds, ev) } @@ -149,9 +149,9 @@ func (wrms *Wrms) AddSong(song *Song) { startPlayingAgain := wrms.playing && wrms.CurrentSong.Load() == nil - if wrms.Config.timeBonus != 0 { - llog.Info("Apply time bonus %v", wrms.Config.timeBonus) - wrms.queue.applyTimeBonus(wrms.Config.timeBonus) + if wrms.Config.TimeBonus != 0 { + llog.Info("Apply time bonus %v", wrms.Config.TimeBonus) + wrms.queue.applyTimeBonus(wrms.Config.TimeBonus) } wrms._addSong(song) |
