From de8bf2b396be38fadf05c830c243d96691326e85 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 22 Aug 2015 14:31:17 -0400 Subject: retry failed recordings --- MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations') diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 5b82b0a1f..2f1b9d03e 100644 --- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -482,10 +482,13 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV { _logger.ErrorException("Error recording stream", ex); - const int retryIntervalSeconds = 60; - _logger.Debug("Retrying recording in {0} seconds.", retryIntervalSeconds); + if (DateTime.UtcNow < timer.EndDate) + { + const int retryIntervalSeconds = 60; + _logger.Debug("Retrying recording in {0} seconds.", retryIntervalSeconds); - _timerProvider.StartTimer(timer, TimeSpan.FromSeconds(retryIntervalSeconds)); + _timerProvider.StartTimer(timer, TimeSpan.FromSeconds(retryIntervalSeconds)); + } } } -- cgit v1.2.3