diff --git a/player/player.go b/player/player.go index f6b65b2..5d49c29 100644 --- a/player/player.go +++ b/player/player.go @@ -34,6 +34,7 @@ type Player struct { endRoutines []*reveil.Routine ntick int64 + hasClaironed bool hasSpokeWeather bool launched time.Time volume uint16 @@ -169,7 +170,7 @@ loop: for { select { case <-p.currentCmdCh: - if time.Since(p.launched) >= p.claironTime { + if !p.hasClaironed && time.Since(p.launched) >= p.claironTime { log.Println("clairon time!") p.claironTime += p.claironTime / 2 p.SetVolume(65535) @@ -177,8 +178,8 @@ loop: go p.playFile(p.claironFile) } else if p.weatherAction != nil && !p.hasSpokeWeather && time.Since(p.launched) >= p.weatherTime { log.Println("weather time!") + p.SetVolume(65535) p.dontUpdateVolume = true - p.hasSpokeWeather = true go p.launchAction(p.weatherAction) } else { p.dontUpdateVolume = false diff --git a/ui/src/routes/+layout.svelte b/ui/src/routes/+layout.svelte index 374ea17..f09d400 100644 --- a/ui/src/routes/+layout.svelte +++ b/ui/src/routes/+layout.svelte @@ -29,7 +29,7 @@ />