private async Task <IEnumerable <RecordingInfo> > GetRecordingsAsync(GetRecordings request) { var services = _liveTvManager.Services; var tasks = services.Select(i => i.GetRecordingsAsync(CancellationToken.None)); var recordings = await Task.WhenAll(tasks).ConfigureAwait(false); return(recordings.SelectMany(i => i)); }
public object Get(GetRecordings request) { var result = _liveTvManager.GetRecordings(new RecordingQuery { ChannelId = request.ChannelId, UserId = request.UserId, GroupId = request.GroupId, StartIndex = request.StartIndex, Limit = request.Limit, Status = request.Status, SeriesTimerId = request.SeriesTimerId, IsInProgress = request.IsInProgress }, CancellationToken.None).Result; return(ToOptimizedSerializedResultUsingCache(result)); }
public async Task <object> Get(GetRecordings request) { var options = GetDtoOptions(request); options.DeviceId = AuthorizationContext.GetAuthorizationInfo(Request).DeviceId; var result = await _liveTvManager.GetRecordings(new RecordingQuery { ChannelId = request.ChannelId, UserId = request.UserId, GroupId = request.GroupId, StartIndex = request.StartIndex, Limit = request.Limit, Status = request.Status, SeriesTimerId = request.SeriesTimerId, IsInProgress = request.IsInProgress }, options, CancellationToken.None).ConfigureAwait(false); return(ToOptimizedResult(result)); }
public object Get(GetRecordings request) { var result = GetRecordingsAsync(request).Result; return(ToOptimizedResult(result)); }