From 103e473f200b76db20ef8d9af3c98db2bfb2aa29 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 31 Jul 2023 18:07:41 +0200 Subject: make time bonus config value usable through yaml --- wrms.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wrms.go') diff --git a/wrms.go b/wrms.go index 5dfdc53..b2bc2dc 100644 --- a/wrms.go +++ b/wrms.go @@ -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) -- cgit v1.2.3