aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2020-07-16 11:53:21 -0400
committerGitHub <noreply@github.com>2020-07-16 11:53:21 -0400
commitedae7b954b56e0931f0e5d7a7f8111cc3e31adbc (patch)
treecad78c6d653431066445a7ff9dbdd4890a28c2d4
parenta9ce8a804fb01cd443c35604e47eb9ad62ba1c54 (diff)
parent0095cb194774bb373738a36a14296de38e18d9e3 (diff)
Merge pull request #3570 from crobibero/async-cancellation
Add EnumeratorCancellation attribute
-rw-r--r--MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
index 8c1b22a88..cd2f96f14 100644
--- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs
@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Providers;
@@ -229,7 +230,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
return GetEpisodesPageAsync(tvdbId, 1, episodeQuery, language, cancellationToken);
}
- public async IAsyncEnumerable<KeyType> GetImageKeyTypesForSeriesAsync(int tvdbId, string language, CancellationToken cancellationToken)
+ public async IAsyncEnumerable<KeyType> GetImageKeyTypesForSeriesAsync(int tvdbId, string language, [EnumeratorCancellation] CancellationToken cancellationToken)
{
var cacheKey = GenerateKey(nameof(TvDbClient.Series.GetImagesSummaryAsync), tvdbId);
var imagesSummary = await TryGetValue(cacheKey, language, () => TvDbClient.Series.GetImagesSummaryAsync(tvdbId, cancellationToken)).ConfigureAwait(false);
@@ -250,7 +251,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
}
}
- public async IAsyncEnumerable<KeyType> GetImageKeyTypesForSeasonAsync(int tvdbId, string language, CancellationToken cancellationToken)
+ public async IAsyncEnumerable<KeyType> GetImageKeyTypesForSeasonAsync(int tvdbId, string language, [EnumeratorCancellation] CancellationToken cancellationToken)
{
var cacheKey = GenerateKey(nameof(TvDbClient.Series.GetImagesSummaryAsync), tvdbId);
var imagesSummary = await TryGetValue(cacheKey, language, () => TvDbClient.Series.GetImagesSummaryAsync(tvdbId, cancellationToken)).ConfigureAwait(false);