FilesType = "files"
PlaylistsType = "playlists"
+ StopType = "stop"
// Status values
Playlists []PlaylistSpec
}
+// Any playlist currently being played should be stopped and PTT disengaged.
+type StopMessage struct {
+ T string
+}
+
type StatusMessage struct {
T string
return t.T, status, nil
}
+ if t.T == StopType {
+ var stop StopMessage
+ err = json.Unmarshal(data, &stop)
+ if err != nil {
+ return "", nil, err
+ }
+ return t.T, stop, nil
+ }
+
return "", nil, errors.New(fmt.Sprintf("unknown message type %v", t.T))
}