Merge pull request 'Check if TTS is disabled before adding messages' (#8) from Tsudico/joyful:no-tts-fix into main
Reviewed-on: https://codeberg.org/annabunches/joyful/pulls/8 Reviewed-by: annabunches <annabunches@noreply.codeberg.org>
This commit is contained in:
commit
add27f17e2
1 changed files with 5 additions and 3 deletions
|
|
@ -53,9 +53,11 @@ func main() {
|
||||||
rules, eventChannel, cancel, wg := loadRules(config, pDevices, vDevicesByName, modes)
|
rules, eventChannel, cancel, wg := loadRules(config, pDevices, vDevicesByName, modes)
|
||||||
|
|
||||||
// initialize TTS phrases for modes
|
// initialize TTS phrases for modes
|
||||||
for _, m := range modes {
|
if !ttsOps.Disabled {
|
||||||
tts.AddMessage(m)
|
for _, m := range modes {
|
||||||
logger.LogDebugf("Added TTS message '%s'", m)
|
tts.AddMessage(m)
|
||||||
|
logger.LogDebugf("Added TTS message '%s'", m)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("Joyful Running! Press Ctrl+C to quit. Press Enter to reload rules.")
|
fmt.Println("Joyful Running! Press Ctrl+C to quit. Press Enter to reload rules.")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue