aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/LiveTv
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2021-02-05 11:47:06 +0900
committerGitHub <noreply@github.com>2021-02-05 11:47:06 +0900
commit54a3ab15a38ff0f10a55398357538376958000e4 (patch)
tree1830eb490de1fc8d6589f920f4c8ffdbb68a4931 /Emby.Server.Implementations/LiveTv
parent2e9661c415c362c694b6d63921ed71cf63b80b6f (diff)
parent1fdd2d6e0527a7b112ed6d79d8854f6fbe6fdaca (diff)
Merge pull request #5005 from jellyfin/bytes
JsonSerializer deserialize from bytes where possible
Diffstat (limited to 'Emby.Server.Implementations/LiveTv')
-rw-r--r--Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
index c80ecd6b3c..57424f0435 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs
@@ -47,11 +47,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
try
{
- var jsonString = File.ReadAllText(_dataPath, Encoding.UTF8);
- _items = JsonSerializer.Deserialize<T[]>(jsonString, _jsonOptions);
+ var bytes = File.ReadAllBytes(_dataPath);
+ _items = JsonSerializer.Deserialize<T[]>(bytes, _jsonOptions);
return;
}
- catch (Exception ex)
+ catch (JsonException ex)
{
Logger.LogError(ex, "Error deserializing {Path}", _dataPath);
}