Pause and resume devices (ref #215)

This commit is contained in:
Jakob Borg
2015-08-23 21:56:10 +02:00
parent 1e447741ee
commit 944d9c84a0
10 changed files with 154 additions and 23 deletions

View File

@@ -123,6 +123,15 @@ func (s *verboseSvc) formatEvent(ev events.Event) string {
delete(sum, "ignorePatterns")
delete(sum, "stateChanged")
return fmt.Sprintf("Summary for folder %q is %v", data["folder"], data["summary"])
case events.DevicePaused:
data := ev.Data.(map[string]string)
device := data["device"]
return fmt.Sprintf("Device %v was paused", device)
case events.DeviceResumed:
data := ev.Data.(map[string]string)
device := data["device"]
return fmt.Sprintf("Device %v was resumed", device)
}
return fmt.Sprintf("%s %#v", ev.Type, ev)