Clean project layout and fix release workflow
Some checks failed
build-windows-exe / build (push) Failing after 1m13s

This commit is contained in:
messypy
2026-07-27 23:01:24 +09:00
parent 3ff33e40e3
commit dd165d9301
80 changed files with 2908 additions and 5661 deletions

View File

@@ -54,6 +54,41 @@ func handleDiscordSend(state *discordMuteState, args []osc.Value) error {
return nil
}
func unmuteDiscordIfMuted(state *discordMuteState, source string) error {
if state == nil {
return fmt.Errorf("discord state is nil")
}
state.mu.Lock()
defer state.mu.Unlock()
if !state.muted {
log.Printf("INFO %s requested Discord unmute but already unmuted", source)
SetDiscordAction("already_unmuted")
SetDiscordSource(source)
return nil
}
now := time.Now()
if !state.lastAction.IsZero() && now.Sub(state.lastAction) < discordDebounce {
return nil
}
log.Printf("ACTION %s -> Discord unmute hotkey", source)
if err := pressDiscordMuteHotkey(); err != nil {
log.Printf("discord unmute hotkey failed: %v", err)
SetDiscordAction("hotkey_failed")
SetDiscordSource(source + "_error")
state.lastAction = now
return err
}
state.muted = false
state.lastAction = now
SetDiscordMuted(false)
SetDiscordAction("unmuted")
SetDiscordSource(source)
return nil
}
func toBool(v osc.Value) (bool, error) {
switch v.Type {
case 'T':