diff --git a/IntroSkipper/Manager/MediaSegmentUpdateManager.cs b/IntroSkipper/Manager/MediaSegmentUpdateManager.cs index dafe45a..9dc9162 100644 --- a/IntroSkipper/Manager/MediaSegmentUpdateManager.cs +++ b/IntroSkipper/Manager/MediaSegmentUpdateManager.cs @@ -39,8 +39,17 @@ namespace IntroSkipper.Manager cancellationToken.ThrowIfCancellationRequested(); try { - var existingSegments = await _mediaSegmentManager.GetSegmentsAsync(episode.EpisodeId, null).ConfigureAwait(false); - await Task.WhenAll(existingSegments.Select(s => _mediaSegmentManager.DeleteSegmentAsync(s.Id))).ConfigureAwait(false); + 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 newSegments = await _segmentProvider.GetMediaSegments(new MediaSegmentGenerationRequest { ItemId = episode.EpisodeId }, cancellationToken).ConfigureAwait(false);