update next/previous buttons

This commit is contained in:
Luke Pulverenti
2014-01-24 13:09:50 -05:00
parent e92688fbec
commit 3cc608d781
15 changed files with 83 additions and 45 deletions

View File

@@ -649,11 +649,6 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.DateCreated = item.DateCreated;
}
if (fields.Contains(ItemFields.OriginalRunTimeTicks))
{
dto.OriginalRunTimeTicks = item.OriginalRunTimeTicks;
}
dto.DisplayMediaType = item.DisplayMediaType;
if (fields.Contains(ItemFields.Settings))

View File

@@ -271,7 +271,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
return dto;
}
public LiveTvTunerInfoDto GetTunerInfoDto(string serviceName, LiveTvTunerInfo info)
public LiveTvTunerInfoDto GetTunerInfoDto(string serviceName, LiveTvTunerInfo info, string channelName)
{
var dto = new LiveTvTunerInfoDto
{
@@ -280,7 +280,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
Clients = info.Clients,
ProgramName = info.ProgramName,
SourceType = info.SourceType,
Status = info.Status
Status = info.Status,
ChannelName = channelName
};
if (!string.IsNullOrEmpty(info.ChannelId))

View File

@@ -1435,7 +1435,20 @@ namespace MediaBrowser.Server.Implementations.LiveTv
info.HasUpdateAvailable = statusInfo.HasUpdateAvailable;
info.HomePageUrl = service.HomePageUrl;
info.Tuners = statusInfo.Tuners.Select(i => _tvDtoService.GetTunerInfoDto(service.Name, i)).ToList();
info.Tuners = statusInfo.Tuners.Select(i =>
{
string channelName = null;
if (!string.IsNullOrEmpty(i.ChannelId))
{
var internalChannelId = _tvDtoService.GetInternalChannelId(service.Name, i.ChannelId);
var channel = GetInternalChannel(internalChannelId);
channelName = channel == null ? null : channel.Name;
}
return _tvDtoService.GetTunerInfoDto(service.Name, i, channelName);
}).ToList();
}
catch (Exception ex)
{