Преглед на файлове

Move TimerInfo start time logic out of RecordingHelper

Patrick Barron преди 1 година
родител
ревизия
3b341c06db
променени са 2 файла, в които са добавени 1 реда и са изтрити 6 реда
  1. 0 5
      src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs
  2. 1 1
      src/Jellyfin.LiveTv/Timers/TimerManager.cs

+ 0 - 5
src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs

@@ -7,11 +7,6 @@ namespace Jellyfin.LiveTv.Recordings
 {
     internal static class RecordingHelper
     {
-        public static DateTime GetStartTime(TimerInfo timer)
-        {
-            return timer.StartDate.AddSeconds(-timer.PrePaddingSeconds);
-        }
-
         public static string GetRecordingName(TimerInfo info)
         {
             var name = info.Name;

+ 1 - 1
src/Jellyfin.LiveTv/Timers/TimerManager.cs

@@ -95,7 +95,7 @@ namespace Jellyfin.LiveTv.Timers
                 return;
             }
 
-            var startDate = RecordingHelper.GetStartTime(item);
+            var startDate = item.StartDate.AddSeconds(-item.PrePaddingSeconds);
             var now = DateTime.UtcNow;
 
             if (startDate < now)