More cleaning

This commit is contained in:
cvium 2019-01-07 20:35:26 +01:00 committed by Bond-009
parent 0e422a33d6
commit 22a64f37f5

View File

@ -2394,12 +2394,9 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
TimerCreated?.Invoke(this, new GenericEventArgs<TimerInfo>(timer));
}
else
{
// 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
ActiveRecordingInfo activeRecordingInfo;
if (!_activeRecordings.TryGetValue(timer.Id, out activeRecordingInfo) && !_activeRecordings.TryGetValue(existingTimer.Id, out activeRecordingInfo))
else if (!_activeRecordings.TryGetValue(timer.Id, out _) && !_activeRecordings.TryGetValue(existingTimer.Id, out _))
{
UpdateExistingTimerWithNewMetadata(existingTimer, timer);
@ -2434,7 +2431,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
_timerProvider.Update(existingTimer);
}
}
}
SearchForDuplicateShowIds(enabledTimersForSeries);
@ -2760,7 +2756,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
if (configuredDevice != null && !string.Equals(device.Url, configuredDevice.Url, StringComparison.OrdinalIgnoreCase))
{
_logger.LogInformation("Tuner url has changed from {0} to {1}", configuredDevice.Url, device.Url);
_logger.LogInformation("Tuner url has changed from {PreviousUrl} to {NewUrl}", configuredDevice.Url, device.Url);
configuredDevice.Url = device.Url;
await _liveTvManager.SaveTunerHost(configuredDevice).ConfigureAwait(false);