From 2d09c187cc4707b94c845984429412b86881b59b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 17 Dec 2016 23:58:20 -0500 Subject: [PATCH] redesign series timer edit screen --- .../LiveTv/LiveTvDtoService.cs | 68 +++++++++++++++++++ MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 13 ++++ .../MediaBrowser.WebDashboard.csproj | 12 +--- 3 files changed, 84 insertions(+), 9 deletions(-) diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs index 7c1de251c..e73378dde 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs @@ -167,6 +167,21 @@ namespace Emby.Server.Implementations.LiveTv { } } + image = librarySeries.GetImageInfo(ImageType.Backdrop, 0); + if (image != null) + { + try + { + dto.ParentBackdropImageTags = new List + { + _imageProcessor.GetImageCacheTag(librarySeries, image) + }; + dto.ParentBackdropItemId = librarySeries.Id.ToString("N"); + } + catch (Exception ex) + { + } + } } if (!string.IsNullOrWhiteSpace(programSeriesId)) @@ -194,6 +209,25 @@ namespace Emby.Server.Implementations.LiveTv { } } + + if (dto.ParentBackdropImageTags == null || dto.ParentBackdropImageTags.Count == 0) + { + image = program.GetImageInfo(ImageType.Backdrop, 0); + if (image != null) + { + try + { + dto.ParentBackdropImageTags = new List + { + _imageProcessor.GetImageCacheTag(program, image) + }; + dto.ParentBackdropItemId = program.Id.ToString("N"); + } + catch (Exception ex) + { + } + } + } } } } @@ -223,6 +257,21 @@ namespace Emby.Server.Implementations.LiveTv { } } + image = librarySeries.GetImageInfo(ImageType.Backdrop, 0); + if (image != null) + { + try + { + dto.ParentBackdropImageTags = new List + { + _imageProcessor.GetImageCacheTag(librarySeries, image) + }; + dto.ParentBackdropItemId = librarySeries.Id.ToString("N"); + } + catch (Exception ex) + { + } + } } if (!string.IsNullOrWhiteSpace(programSeriesId)) @@ -250,6 +299,25 @@ namespace Emby.Server.Implementations.LiveTv { } } + + if (dto.ParentBackdropImageTags == null || dto.ParentBackdropImageTags.Count == 0) + { + image = program.GetImageInfo(ImageType.Backdrop, 0); + if (image != null) + { + try + { + dto.ParentBackdropImageTags = new List + { + _imageProcessor.GetImageCacheTag(program, image) + }; + dto.ParentBackdropItemId = program.Id.ToString("N"); + } + catch (Exception ex) + { + } + } + } } } } diff --git a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs index 7e93a130b..9d7fdd129 100644 --- a/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs +++ b/MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Dto; using System; +using System.Collections.Generic; namespace MediaBrowser.Model.LiveTv { @@ -102,6 +103,18 @@ namespace MediaBrowser.Model.LiveTv /// true if this instance is pre padding required; otherwise, false. public bool IsPrePaddingRequired { get; set; } + /// + /// If the item does not have any backdrops, this will hold the Id of the Parent that has one. + /// + /// The parent backdrop item id. + public string ParentBackdropItemId { get; set; } + + /// + /// Gets or sets the parent backdrop image tags. + /// + /// The parent backdrop image tags. + public List ParentBackdropImageTags { get; set; } + /// /// Gets or sets a value indicating whether this instance is post padding required. /// diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index be5db5a0e..867892567 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -180,6 +180,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -714,9 +717,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest @@ -897,9 +897,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest @@ -942,9 +939,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest