diff options
Diffstat (limited to 'Emby.Server.Implementations/Channels/ChannelManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelManager.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 4e4fbf82c..b462d7bdc 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -340,8 +340,8 @@ namespace Emby.Server.Implementations.Channels try { - var jsonString = File.ReadAllText(path); - return JsonSerializer.Deserialize<List<MediaSourceInfo>>(jsonString, JsonDefaults.GetOptions()) ?? new List<MediaSourceInfo>(); + using FileStream jsonStream = File.OpenRead(path); + return JsonSerializer.DeserializeAsync<List<MediaSourceInfo>>(jsonStream, JsonDefaults.GetOptions()).GetAwaiter().GetResult(); } catch { |
