From 3cc608d781b72b9e9c2dd91f90d90a5cf6f0a57a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 24 Jan 2014 13:09:50 -0500 Subject: update next/previous buttons --- MediaBrowser.Server.Implementations/Dto/DtoService.cs | 5 ----- .../LiveTv/LiveTvDtoService.cs | 5 +++-- .../LiveTv/LiveTvManager.cs | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 7fa299050..7a9735e0e 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -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)) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs index 5b25e259a..4805adb1f 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -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)) diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 0d2f323b4..e256d7da5 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -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) { -- cgit v1.2.3