aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2024-02-22 09:43:55 -0500
committerPatrick Barron <barronpm@gmail.com>2024-02-23 09:57:55 -0500
commit3b341c06db66ae675b37102e6c5d4009def1b48d (patch)
treeb9f9f309822e2dc01c8260aa022c0726b0c88820
parentcac7ff84ca407d7f452f1ea988f472118012f6da (diff)
Move TimerInfo start time logic out of RecordingHelper
-rw-r--r--src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs5
-rw-r--r--src/Jellyfin.LiveTv/Timers/TimerManager.cs2
2 files changed, 1 insertions, 6 deletions
diff --git a/src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs b/src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs
index 1c8e2960b..2b7564045 100644
--- a/src/Jellyfin.LiveTv/Recordings/RecordingHelper.cs
+++ b/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;
diff --git a/src/Jellyfin.LiveTv/Timers/TimerManager.cs b/src/Jellyfin.LiveTv/Timers/TimerManager.cs
index 2e5003a53..da5deea36 100644
--- a/src/Jellyfin.LiveTv/Timers/TimerManager.cs
+++ b/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)