aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/LiveStreamHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Library/LiveStreamHelper.cs')
-rw-r--r--Emby.Server.Implementations/Library/LiveStreamHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/LiveStreamHelper.cs b/Emby.Server.Implementations/Library/LiveStreamHelper.cs
index ad7988fb1..3ceba0fe9 100644
--- a/Emby.Server.Implementations/Library/LiveStreamHelper.cs
+++ b/Emby.Server.Implementations/Library/LiveStreamHelper.cs
@@ -46,8 +46,8 @@ namespace Emby.Server.Implementations.Library
{
try
{
- var jsonString = await File.ReadAllTextAsync(cacheFilePath, cancellationToken).ConfigureAwait(false);
- JsonSerializer.Deserialize<MediaInfo>(jsonString, JsonDefaults.GetOptions());
+ await using FileStream jsonStream = File.OpenRead(cacheFilePath);
+ await JsonSerializer.DeserializeAsync<MediaInfo>(jsonStream, JsonDefaults.GetOptions(), cancellationToken).ConfigureAwait(false);
// _logger.LogDebug("Found cached media info");
}