mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-15 10:43:30 +01:00
Use streams instead of strings
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user