mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Don't cancel DVR recordings when adjusting settings (#8752)
Fixes https://github.com/jellyfin/jellyfin/issues/3523
This commit is contained in:
parent
32fc46eb6a
commit
b5f9a093dd
@ -2201,7 +2201,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
}
|
||||
}
|
||||
|
||||
private void SearchForDuplicateShowIds(List<TimerInfo> timers)
|
||||
private void SearchForDuplicateShowIds(IEnumerable<TimerInfo> timers)
|
||||
{
|
||||
var groups = timers.ToLookup(i => i.ShowId ?? string.Empty).ToList();
|
||||
|
||||
@ -2282,39 +2282,13 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
|
||||
if (updateTimerSettings)
|
||||
{
|
||||
// Only update if not currently active - test both new timer and existing in case Id's are different
|
||||
// Id's could be different if the timer was created manually prior to series timer creation
|
||||
if (!_activeRecordings.TryGetValue(timer.Id, out _) && !_activeRecordings.TryGetValue(existingTimer.Id, out _))
|
||||
{
|
||||
UpdateExistingTimerWithNewMetadata(existingTimer, timer);
|
||||
|
||||
// Needed by ShouldCancelTimerForSeriesTimer
|
||||
timer.IsManual = existingTimer.IsManual;
|
||||
|
||||
if (ShouldCancelTimerForSeriesTimer(seriesTimer, timer))
|
||||
{
|
||||
existingTimer.Status = RecordingStatus.Cancelled;
|
||||
}
|
||||
else if (!existingTimer.IsManual)
|
||||
{
|
||||
existingTimer.Status = RecordingStatus.New;
|
||||
}
|
||||
|
||||
if (existingTimer.Status != RecordingStatus.Cancelled)
|
||||
{
|
||||
enabledTimersForSeries.Add(existingTimer);
|
||||
}
|
||||
|
||||
existingTimer.KeepUntil = seriesTimer.KeepUntil;
|
||||
existingTimer.IsPostPaddingRequired = seriesTimer.IsPostPaddingRequired;
|
||||
existingTimer.IsPrePaddingRequired = seriesTimer.IsPrePaddingRequired;
|
||||
existingTimer.PostPaddingSeconds = seriesTimer.PostPaddingSeconds;
|
||||
existingTimer.PrePaddingSeconds = seriesTimer.PrePaddingSeconds;
|
||||
existingTimer.Priority = seriesTimer.Priority;
|
||||
existingTimer.SeriesTimerId = seriesTimer.Id;
|
||||
|
||||
_timerProvider.Update(existingTimer);
|
||||
}
|
||||
existingTimer.KeepUntil = seriesTimer.KeepUntil;
|
||||
existingTimer.IsPostPaddingRequired = seriesTimer.IsPostPaddingRequired;
|
||||
existingTimer.IsPrePaddingRequired = seriesTimer.IsPrePaddingRequired;
|
||||
existingTimer.PostPaddingSeconds = seriesTimer.PostPaddingSeconds;
|
||||
existingTimer.PrePaddingSeconds = seriesTimer.PrePaddingSeconds;
|
||||
existingTimer.Priority = seriesTimer.Priority;
|
||||
existingTimer.SeriesTimerId = seriesTimer.Id;
|
||||
}
|
||||
|
||||
existingTimer.SeriesTimerId = seriesTimer.Id;
|
||||
|
Loading…
Reference in New Issue
Block a user