public async Task UpdateTimerAsync(TimerInfo info, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] UpdateTimerAsync ..."); _logger.Info(info.ToJson()); await VdrApiClient.UpdateTimer(info); }
public async Task <IEnumerable <ChannelInfo> > GetChannelsAsync(System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetChannelsAsync ..."); var channels = await VdrApiClient.GetChannelsAsync(_logger); return(channels); }
public async Task <IEnumerable <TimerInfo> > GetTimersAsync(System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetTimersAsync ..."); var timers = await VdrApiClient.GetTimersAsync(); return(timers); }
public async Task <IEnumerable <RecordingInfo> > GetRecordingsAsync(System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetRecordingsAsync ..."); var recordings = await VdrApiClient.GetRecordingsAsync(); return(recordings); }
public async Task <IEnumerable <ProgramInfo> > GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetProgramsAsync | {0} | {1} - {2} ...", channelId, startDateUtc, endDateUtc); var events = await VdrApiClient.GetEventAsync(channelId, startDateUtc, endDateUtc); return(events); }
public async Task <IEnumerable <ProgramInfo> > GetProgramsAsync(string channelId, DateTime startDateUtc, DateTime endDateUtc, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetProgramsAsync | {0} | {1} - {2} ...", channelId, startDateUtc.ToLocalTime(), endDateUtc.ToLocalTime()); try { var events = await VdrApiClient.GetEventAsync(channelId, startDateUtc.ToLocalTime(), endDateUtc.ToLocalTime(), _logger); return(events); } catch (Exception ex) { _logger.Info("[VDR LiveTV] GetProgramsAsync - no events | {0} | {1} - {2} | {3}...", channelId, startDateUtc.ToLocalTime(), endDateUtc.ToLocalTime(), ex.Message); return(null); } }
public async Task <MediaBrowser.Controller.Drawing.ImageStream> GetProgramImageAsync(string programId, string channelId, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] GetProgramImageAsync | {0} | {1} ...", programId, channelId); try { byte[] imgData = await VdrApiClient.GetEventImageAsync(int.Parse(programId), 0); _logger.Info("[VDR LiveTV] GetProgramImageAsync {0} bytes reveived.", imgData.Length); return(new MediaBrowser.Controller.Drawing.ImageStream { Format = MediaBrowser.Model.Drawing.ImageFormat.Jpg, Stream = new MemoryStream(imgData) }); } catch (Exception ex) { _logger.Info("[VDR LiveTV] GetProgramImageAsync error: ", ex.Message); return(null); } }
public async Task CancelTimerAsync(string timerId, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] CancelTimerAsync ..."); await VdrApiClient.CancelTimer(timerId); }
public async Task DeleteRecordingAsync(string recordingId, System.Threading.CancellationToken cancellationToken) { _logger.Info("[VDR LiveTV] DeleteRecordingAsync ..."); await VdrApiClient.DeleteRecording(recordingId); }