diff options
| author | David <daullmer@gmail.com> | 2020-12-23 19:24:58 +0100 |
|---|---|---|
| committer | David <daullmer@gmail.com> | 2020-12-23 19:24:58 +0100 |
| commit | 2a574914eaca486f6216db400d9fdf88ad88636e (patch) | |
| tree | 760b7c769e71cfd88ff54282622a704143bb2b4f /Emby.Server.Implementations/Library/LiveStreamHelper.cs | |
| parent | f38970cbd32c845d1740828450aac8de16fec788 (diff) | |
Use streams instead of strings
Diffstat (limited to 'Emby.Server.Implementations/Library/LiveStreamHelper.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/LiveStreamHelper.cs | 4 |
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"); } |
