diff options
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -12,8 +12,9 @@ const configPathRelative = `.config/soundbox/config.json` type Config struct { Soundboxes []struct { - Name string - Mac net.HardwareAddr + Name string + Mac net.HardwareAddr + Enabled bool } URLs []struct { Name string @@ -24,8 +25,9 @@ type Config struct { func (config *Config) UnmarshalJSON(data []byte) error { var buffer struct { Soundboxes []struct { - Name string - Mac string + Name string + Mac string + Enabled bool } URLs []struct { Name string @@ -46,9 +48,10 @@ func (config *Config) UnmarshalJSON(data []byte) error { return err } parsed.Soundboxes = append(parsed.Soundboxes, struct { - Name string - Mac net.HardwareAddr - }{soundbox.Name, hwAddr}) + Name string + Mac net.HardwareAddr + Enabled bool + }{soundbox.Name, hwAddr, soundbox.Enabled}) } for _, url := range buffer.URLs { |