public Task GetStatus() { StatusViewModel vm = new StatusViewModel(); vm.bpm = StreamingSetup.GetBPM(); vm.IsAutoMode = EffectService.IsAutoModeRunning(); return(Clients.All.SendAsync("Status", vm)); }
public async Task GetStatus() { var configs = await StreamingSetup.GetGroupConfigurationsAsync(); StatusViewModel vm = new StatusViewModel(); vm.bpm = StreamingSetup.GetBPM(); vm.IsAutoMode = EffectService.IsAutoModeRunning(); vm.AutoModeHasRandomEffects = EffectService.AutoModeHasRandomEffects; vm.ShowDisconnect = !(StreamingSetup.CurrentConnection?.HideDisconnect ?? false); vm.GroupNames = configs.Select(x => x.Name).ToList(); vm.CurrentGroup = StreamingSetup.CurrentConnection?.Name; await Clients.All.SendAsync("Status", vm); }