The Free Software Media System - Server Backend & API
wip
lostb1t7f1a0ff6fce2
diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.csindex 6b1c5f952f..bf7ec05a96 100644--- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs+++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs@@ -965,15 +965,12 @@ namespace MediaBrowser.MediaEncoding.Subtitles{case MediaProtocol.Http:{- using var resp = await _httpClientFactory+ using var stream = await _httpClientFactory.CreateClient(NamedClient.Default)- .GetAsync(new Uri(path), HttpCompletionOption.ResponseHeadersRead, cancellationToken)+ .GetStreamAsync(new Uri(path), cancellationToken).ConfigureAwait(false);- resp.EnsureSuccessStatusCode();-- using var s = await resp.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);- return await CharsetDetector.DetectFromStreamAsync(s, cancellationToken).ConfigureAwait(false);+ return await CharsetDetector.DetectFromStreamAsync(stream, cancellationToken).ConfigureAwait(false);}case MediaProtocol.File: