Parcourir la source

update recording dialogs

Luke Pulverenti il y a 8 ans
Parent
commit
6999017bc9

+ 4 - 0
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -44,6 +44,7 @@ namespace MediaBrowser.Controller.Entities
             ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
             LockedFields = new List<MetadataFields>();
             ImageInfos = new List<ItemImageInfo>();
+            InheritedTags = new List<string>();
         }
 
         public static readonly char[] SlugReplaceChars = { '?', '/', '&' };
@@ -794,6 +795,9 @@ namespace MediaBrowser.Controller.Entities
         [IgnoreDataMember]
         public int InheritedParentalRatingValue { get; set; }
 
+        [IgnoreDataMember]
+        public List<string> InheritedTags { get; set; }
+
         /// <summary>
         /// Gets or sets the critic rating.
         /// </summary>

+ 1 - 0
MediaBrowser.Controller/Entities/IHasMetadata.cs

@@ -64,5 +64,6 @@ namespace MediaBrowser.Controller.Entities
         int? GetInheritedParentalRatingValue();
         int InheritedParentalRatingValue { get; set; }
         List<string> GetInheritedTags();
+        List<string> InheritedTags { get; set; }
     }
 }

+ 5 - 0
MediaBrowser.Controller/LiveTv/SeriesTimerInfo.cs

@@ -53,6 +53,10 @@ namespace MediaBrowser.Controller.LiveTv
         /// <value><c>true</c> if [record any channel]; otherwise, <c>false</c>.</value>
         public bool RecordAnyChannel { get; set; }
 
+        public int KeepUpTo { get; set; }
+
+        public bool SkipEpisodesInLibrary { get; set; }
+
         /// <summary>
         /// Gets or sets a value indicating whether [record new only].
         /// </summary>
@@ -104,6 +108,7 @@ namespace MediaBrowser.Controller.LiveTv
         public SeriesTimerInfo()
         {
             Days = new List<DayOfWeek>();
+            SkipEpisodesInLibrary = true;
         }
     }
 }

+ 4 - 0
MediaBrowser.Model/LiveTv/SeriesTimerInfoDto.cs

@@ -18,12 +18,16 @@ namespace MediaBrowser.Model.LiveTv
         /// <value><c>true</c> if [record any time]; otherwise, <c>false</c>.</value>
         public bool RecordAnyTime { get; set; }
 
+        public bool SkipEpisodesInLibrary { get; set; }
+
         /// <summary>
         /// Gets or sets a value indicating whether [record any channel].
         /// </summary>
         /// <value><c>true</c> if [record any channel]; otherwise, <c>false</c>.</value>
         public bool RecordAnyChannel { get; set; }
 
+        public int KeepUpTo { get; set; }
+
         /// <summary>
         /// Gets or sets a value indicating whether [record new only].
         /// </summary>

+ 3 - 1
MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs

@@ -541,6 +541,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
                 instance.RecordAnyChannel = info.RecordAnyChannel;
                 instance.RecordAnyTime = info.RecordAnyTime;
                 instance.RecordNewOnly = info.RecordNewOnly;
+                instance.SkipEpisodesInLibrary = info.SkipEpisodesInLibrary;
+                instance.KeepUpTo = info.KeepUpTo;
                 instance.StartDate = info.StartDate;
 
                 _seriesTimerProvider.Update(instance);
@@ -1381,7 +1383,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
 
             allPrograms = GetProgramsForSeries(seriesTimer, allPrograms);
 
-            if (filterByCurrentRecordings)
+            if (filterByCurrentRecordings && seriesTimer.SkipEpisodesInLibrary)
             {
                 allPrograms = allPrograms.Where(i => !IsProgramAlreadyInLibrary(i));
             }

+ 4 - 0
MediaBrowser.Server.Implementations/LiveTv/LiveTvDtoService.cs

@@ -100,6 +100,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 Priority = info.Priority,
                 RecordAnyChannel = info.RecordAnyChannel,
                 RecordAnyTime = info.RecordAnyTime,
+                SkipEpisodesInLibrary = info.SkipEpisodesInLibrary,
+                KeepUpTo = info.KeepUpTo,
                 RecordNewOnly = info.RecordNewOnly,
                 ExternalChannelId = info.ChannelId,
                 ExternalProgramId = info.ProgramId,
@@ -308,6 +310,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 Priority = dto.Priority,
                 RecordAnyChannel = dto.RecordAnyChannel,
                 RecordAnyTime = dto.RecordAnyTime,
+                SkipEpisodesInLibrary = dto.SkipEpisodesInLibrary,
+                KeepUpTo = dto.KeepUpTo,
                 RecordNewOnly = dto.RecordNewOnly,
                 ProgramId = dto.ExternalProgramId,
                 ChannelId = dto.ExternalChannelId,