aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Channels/ChannelManager.cs
diff options
context:
space:
mode:
authorDavid <daullmer@gmail.com>2020-12-29 00:35:59 +0100
committerDavid <daullmer@gmail.com>2020-12-29 00:35:59 +0100
commit3dec1fd6b23fa4f7f9bc3f66edca8ec0f285ae0f (patch)
tree3908e243168eff9334be335dddaf440c47bff1c2 /Emby.Server.Implementations/Channels/ChannelManager.cs
parent8ac1ed16ca6d539cf9061b3c9de139dcf148f401 (diff)
Use UTF8 encoding and async correctly
Diffstat (limited to 'Emby.Server.Implementations/Channels/ChannelManager.cs')
-rw-r--r--Emby.Server.Implementations/Channels/ChannelManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs
index cf6a87ecf..2d5b19fa6 100644
--- a/Emby.Server.Implementations/Channels/ChannelManager.cs
+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
+using System.Text;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@@ -341,7 +342,7 @@ namespace Emby.Server.Implementations.Channels
try
{
- var jsonString = File.ReadAllText(path);
+ var jsonString = File.ReadAllText(path, Encoding.UTF8);
return JsonSerializer.Deserialize<List<MediaSourceInfo>>(jsonString, _jsonOptions)
?? new List<MediaSourceInfo>();
}
@@ -1180,11 +1181,11 @@ namespace Emby.Server.Implementations.Channels
{
if (enableMediaProbe && !info.IsLiveStream && item.HasPathProtocol)
{
- await SaveMediaSources(item, new List<MediaSourceInfo>());
+ await SaveMediaSources(item, new List<MediaSourceInfo>()).ConfigureAwait(false);
}
else
{
- await SaveMediaSources(item, info.MediaSources);
+ await SaveMediaSources(item, info.MediaSources).ConfigureAwait(false);
}
}