From 0c398a567041e5de37837b71f16d00fbc2913d3c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 29 Nov 2013 13:44:51 -0500 Subject: [PATCH] added create live tv timer page --- MediaBrowser.Model/LiveTv/ChannelInfoDto.cs | 19 +++++++++++++------ .../LiveTv/LiveTvManager.cs | 8 +++++++- .../Api/DashboardService.cs | 1 + .../MediaBrowser.WebDashboard.csproj | 6 ++++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs index f1d550e77..020771e5e 100644 --- a/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/ChannelInfoDto.cs @@ -1,5 +1,7 @@ -using System; -using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; +using System; +using System.Collections.Generic; namespace MediaBrowser.Model.LiveTv { @@ -19,12 +21,12 @@ namespace MediaBrowser.Model.LiveTv /// /// The identifier. public string Id { get; set; } - + /// - /// Gets or sets the logo image tag. + /// Gets or sets the image tags. /// - /// The logo image tag. - public Guid? PrimaryImageTag { get; set; } + /// The image tags. + public Dictionary ImageTags { get; set; } /// /// Gets or sets the number. @@ -61,5 +63,10 @@ namespace MediaBrowser.Model.LiveTv /// /// The user data. public UserItemDataDto UserData { get; set; } + + public ChannelInfoDto() + { + ImageTags = new Dictionary(); + } } } diff --git a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs index 4d3d87788..688a4cc64 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs @@ -87,7 +87,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv ServiceName = info.ServiceName, ChannelType = info.ChannelType, Number = info.ChannelNumber, - PrimaryImageTag = GetLogoImageTag(info), Type = info.GetType().Name, Id = info.Id.ToString("N"), MediaType = info.MediaType @@ -98,6 +97,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv dto.UserData = _dtoService.GetUserItemDataDto(_userDataManager.GetUserData(user.Id, info.GetUserDataKey())); } + var imageTag = GetLogoImageTag(info); + + if (imageTag.HasValue) + { + dto.ImageTags[ImageType.Primary] = imageTag.Value; + } + return dto; } diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 69f05631f..9076777a5 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -483,6 +483,7 @@ namespace MediaBrowser.WebDashboard.Api "livetvchannels.js", "livetvguide.js", "livetvrecordings.js", + "livetvtimer.js", "livetvtimers.js", "loginpage.js", "logpage.js", diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 4aca619aa..73b281d9a 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -347,6 +347,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest