diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-01-22 16:48:31 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-01-22 16:48:31 +0100 |
| commit | 2dcb2f8a9f4be9ca69c050ce9ee94d647e8d5d5f (patch) | |
| tree | 3379ed498180e79fd7ce7747d7c67fb053d7a314 /MediaBrowser.Controller/Channels/Channel.cs | |
| parent | cd675475bc5f37d4b20ed71271b17d0945b3f969 (diff) | |
Ban the usage of Task.Result
If the calling function can't be made async easily you can still use
.GetAwaiter().GetResult(), which is way easier to find in the future
Diffstat (limited to 'MediaBrowser.Controller/Channels/Channel.cs')
| -rw-r--r-- | MediaBrowser.Controller/Channels/Channel.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs index e6923b55c..85a99d62c 100644 --- a/MediaBrowser.Controller/Channels/Channel.cs +++ b/MediaBrowser.Controller/Channels/Channel.cs @@ -53,7 +53,7 @@ namespace MediaBrowser.Controller.Channels query.ChannelIds = new Guid[] { Id }; // Don't blow up here because it could cause parent screens with other content to fail - return ChannelManager.GetChannelItemsInternal(query, new SimpleProgress<double>(), CancellationToken.None).Result; + return ChannelManager.GetChannelItemsInternal(query, new SimpleProgress<double>(), CancellationToken.None).GetAwaiter().GetResult(); } catch { |
