From 2dcb2f8a9f4be9ca69c050ce9ee94d647e8d5d5f Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Sat, 22 Jan 2022 16:48:31 +0100 Subject: 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 --- MediaBrowser.Controller/Entities/Folder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MediaBrowser.Controller/Entities') diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index 79ffddc00..52b975a94 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -964,7 +964,7 @@ namespace MediaBrowser.Controller.Entities query.ChannelIds = new[] { ChannelId }; // Don't blow up here because it could cause parent screens with other content to fail - return ChannelManager.GetChannelItemsInternal(query, new SimpleProgress(), CancellationToken.None).Result; + return ChannelManager.GetChannelItemsInternal(query, new SimpleProgress(), CancellationToken.None).GetAwaiter().GetResult(); } catch { -- cgit v1.2.3