From b5b994b22f8ec8cf0fd10f67d78d66dd12b3e21c Mon Sep 17 00:00:00 2001 From: Jonas Resch Date: Sun, 28 Nov 2021 14:20:12 +0100 Subject: [PATCH] Fix compiler warning due to missing EnumeratorCancellation attribute --- MediaBrowser.Providers/MediaInfo/AudioResolver.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/MediaInfo/AudioResolver.cs b/MediaBrowser.Providers/MediaInfo/AudioResolver.cs index d23afdc3b9..869512f76c 100644 --- a/MediaBrowser.Providers/MediaInfo/AudioResolver.cs +++ b/MediaBrowser.Providers/MediaInfo/AudioResolver.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Runtime.CompilerServices; using System.Threading; using System.Threading.Tasks; using Emby.Naming.Audio; @@ -40,8 +41,11 @@ namespace MediaBrowser.Providers.MediaInfo int startIndex, IDirectoryService directoryService, bool clearCache, - CancellationToken cancellationToken) + [EnumeratorCancellation] CancellationToken cancellationToken) { + + cancellationToken.ThrowIfCancellationRequested(); + if (!video.IsFileProtocol) { yield break;