rework text subtitles

This commit is contained in:
Luke Pulverenti
2014-01-10 08:52:01 -05:00
parent c23bd68220
commit ec4000404d
21 changed files with 293 additions and 175 deletions

View File

@@ -98,7 +98,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
});
}
var returnChannels = channels.OrderBy(i =>
channels = channels.OrderBy(i =>
{
double number = 0;
@@ -109,14 +109,29 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return number;
}).ThenBy(i => i.Name)
.Select(i => _tvDtoService.GetChannelInfoDto(i, GetCurrentProgram(i.ChannelInfo.Id), user))
.ToArray();
}).ThenBy(i => i.Name);
var allChannels = channels.ToList();
IEnumerable<LiveTvChannel> allEnumerable = allChannels;
if (query.StartIndex.HasValue)
{
allEnumerable = allEnumerable.Skip(query.StartIndex.Value);
}
if (query.Limit.HasValue)
{
allEnumerable = allEnumerable.Take(query.Limit.Value);
}
var returnChannels = allEnumerable
.Select(i => _tvDtoService.GetChannelInfoDto(i, GetCurrentProgram(i.ChannelInfo.Id), user))
.ToArray();
var result = new QueryResult<ChannelInfoDto>
{
Items = returnChannels,
TotalRecordCount = returnChannels.Length
TotalRecordCount = allChannels.Count
};
return Task.FromResult(result);
@@ -575,9 +590,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
.Where(i => _tvDtoService.GetInternalSeriesTimerId(currentServiceName, i.SeriesTimerId) == guid);
}
IEnumerable<ILiveTvRecording> entities = await GetEntities(recordings, service.Name, cancellationToken).ConfigureAwait(false);
recordings = recordings.OrderByDescending(i => i.StartDate);
entities = entities.OrderByDescending(i => i.RecordingInfo.StartDate);
IEnumerable<ILiveTvRecording> entities = await GetEntities(recordings, service.Name, cancellationToken).ConfigureAwait(false);
if (user != null)
{