浏览代码

redesign series timer edit screen

Luke Pulverenti 8 年之前
父节点
当前提交
2d09c187cc

+ 68 - 0
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)
+                            {
+                            }
+                        }
+                    }
                 }
             }
         }

+ 13 - 0
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
         /// <value><c>true</c> if this instance is pre padding required; otherwise, <c>false</c>.</value>
         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>

+ 3 - 9
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>