public async Task <Domain.Schedule.Models.Schedule?> Get(string groupTitle, bool isSession) { try { var scheduleString = await client.GetSchedule(groupTitle, isSession); return(converter.Parse(scheduleString)); } catch (Exception e) { Console.WriteLine(e); return(null); } }
public async Task <Schedule?> Get(string groupTitle, bool isSession) { this.logger.LogDebug($"Get groupTitle = {groupTitle}, isSession = {isSession}"); try { var scheduleString = await client.GetSchedule(groupTitle, isSession); return(converter.ParseSchedule(scheduleString)); } catch (Exception e) { this.logger.LogError(e, "Get"); return(null); } }
void SetUpUI() { if (play != null) { play.Click += (sender, e) => OnPlayButtonClick(); } if (pause != null) { pause.Click += (sender, e) => OnPauseButtonClick(); } var scheduleClient = new ScheduleClient(); webView.Settings.JavaScriptEnabled = true; webView.SetWebViewClient(scheduleClient); webView.LoadUrl("https://godswayradio.com/live/"); _manager = (AudioManager)Application.Context.GetSystemService(Context.AudioService); volume.Max = _manager.GetStreamMaxVolume(Stream.Music); volume.Progress = _manager.GetStreamVolume(Stream.Music); volume.ProgressChanged += (sender, e) => { _manager.SetStreamVolume(Stream.Music, e.Progress, VolumeNotificationFlags.ShowUi); }; Mvx.Resolve <IDeviceTimer>().StartTimer(new TimeSpan(0, 0, 3), () => { if (!_continueTimer) { return(false); } schedule = scheduleClient.GetSchedule(); if (schedule != null) { mainLabel.Text = schedule.ToArray()[0]; subLabel.Text = schedule.ToArray()[1]; _service.UpdateNotification(schedule.ToArray()[0] + "-" + schedule.ToArray()[1], "God's Way Radio"); } else { mainLabel.Text = "God's Way Radio"; subLabel.Text = "104.7 WAYG"; _service.UpdateNotification("God's Way Radio - 104.7 WAYG", "God's Way Radio"); } return(true); }); }