diff options
| -rw-r--r-- | Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs | 68 | ||||
| -rw-r--r-- | MediaBrowser.Model/LiveTv/BaseTimerInfoDto.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.WebDashboard/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<string> + { + _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<string> + { + _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<string> + { + _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<string> + { + _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 { @@ -103,6 +104,18 @@ namespace MediaBrowser.Model.LiveTv public bool IsPrePaddingRequired { get; set; } /// <summary> + /// If the item does not have any backdrops, this will hold the Id of the Parent that has one. + /// </summary> + /// <value>The parent backdrop item id.</value> + public string ParentBackdropItemId { get; set; } + + /// <summary> + /// Gets or sets the parent backdrop image tags. + /// </summary> + /// <value>The parent backdrop image tags.</value> + public List<string> ParentBackdropImageTags { get; set; } + + /// <summary> /// Gets or sets a value indicating whether this instance is post padding required. /// </summary> /// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value> 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 @@ <Content Include="dashboard-ui\scripts\livetvschedule.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="dashboard-ui\scripts\livetvseriestimers.js">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
<Content Include="dashboard-ui\scripts\userpasswordpage.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -714,9 +717,6 @@ <Content Include="dashboard-ui\reports.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\livetvseriestimer.html">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\livetvsettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -897,9 +897,6 @@ <Content Include="dashboard-ui\scripts\livetvchannel.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\scripts\livetvseriestimer.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\scripts\livetvsettings.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@@ -942,9 +939,6 @@ <Content Include="dashboard-ui\scripts\episodes.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="dashboard-ui\scripts\livetvseriestimers.js">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
<Content Include="dashboard-ui\scripts\livetvsuggested.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
|
