aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-24 13:09:50 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-24 13:09:50 -0500
commit3cc608d781b72b9e9c2dd91f90d90a5cf6f0a57a (patch)
tree0da58114f04b53bdcfd51b52169908e35a5549d1 /MediaBrowser.Server.Implementations/LiveTv
parente92688fbec10fe54cf0425bb9262578e5bed1e12 (diff)
update next/previous buttons
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs5
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs15
2 files changed, 17 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs
index 5b25e259a6..4805adb1f0 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 0d2f323b46..e256d7da58 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)
{