From 78e8943061e510c49d0ff200cdf435919538044a Mon Sep 17 00:00:00 2001 From: TwistedUmbrellaX Date: Sun, 17 Nov 2024 09:50:48 -0500 Subject: [PATCH] Drop the fallback and force overwrite --- IntroSkipper/Manager/MediaSegmentUpdateManager.cs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/IntroSkipper/Manager/MediaSegmentUpdateManager.cs b/IntroSkipper/Manager/MediaSegmentUpdateManager.cs index 9dc9162..622243b 100644 --- a/IntroSkipper/Manager/MediaSegmentUpdateManager.cs +++ b/IntroSkipper/Manager/MediaSegmentUpdateManager.cs @@ -39,17 +39,8 @@ namespace IntroSkipper.Manager cancellationToken.ThrowIfCancellationRequested(); try { - try - { - var existingSegments = await _mediaSegmentManager.GetSegmentsAsync(episode.EpisodeId, null, true).ConfigureAwait(false); - await Task.WhenAll(existingSegments.Select(s => _mediaSegmentManager.DeleteSegmentAsync(s.Id))).ConfigureAwait(false); - } - catch (Exception vs) - { - _logger.LogError(vs, "GetSegmentsAsync failed. 10.10.1 compatibility enabled."); - var existingSegments = await _mediaSegmentManager.GetSegmentsAsync(episode.EpisodeId, null).ConfigureAwait(false); - await Task.WhenAll(existingSegments.Select(s => _mediaSegmentManager.DeleteSegmentAsync(s.Id))).ConfigureAwait(false); - } + var existingSegments = await _mediaSegmentManager.GetSegmentsAsync(episode.EpisodeId, null, false).ConfigureAwait(false); + await Task.WhenAll(existingSegments.Select(s => _mediaSegmentManager.DeleteSegmentAsync(s.Id))).ConfigureAwait(false); var newSegments = await _segmentProvider.GetMediaSegments(new MediaSegmentGenerationRequest { ItemId = episode.EpisodeId }, cancellationToken).ConfigureAwait(false);