diff --git a/Jellyfin.Plugin.OpenSubtitles/OpenSubtitleDownloader.cs b/Jellyfin.Plugin.OpenSubtitles/OpenSubtitleDownloader.cs index da48706..d52e555 100644 --- a/Jellyfin.Plugin.OpenSubtitles/OpenSubtitleDownloader.cs +++ b/Jellyfin.Plugin.OpenSubtitles/OpenSubtitleDownloader.cs @@ -30,7 +30,7 @@ public class OpenSubtitleDownloader : ISubtitleProvider private LoginInfo? _login; private DateTime? _limitReset; private DateTime? _lastRatelimitLog; - private IReadOnlyList? _languages; + private List? _languages; private PluginConfiguration? _configuration; /// diff --git a/Jellyfin.Plugin.OpenSubtitles/OpenSubtitlesHandler/OpenSubtitlesRequestHelper.cs b/Jellyfin.Plugin.OpenSubtitles/OpenSubtitlesHandler/OpenSubtitlesRequestHelper.cs index e5f3500..9dda720 100644 --- a/Jellyfin.Plugin.OpenSubtitles/OpenSubtitlesHandler/OpenSubtitlesRequestHelper.cs +++ b/Jellyfin.Plugin.OpenSubtitles/OpenSubtitlesHandler/OpenSubtitlesRequestHelper.cs @@ -104,7 +104,7 @@ public static string ComputeHash(Stream input) } } - var result = await client.SendAsync(request, cancellationToken).ConfigureAwait(false); + using var result = await client.SendAsync(request, cancellationToken).ConfigureAwait(false); var resHeaders = result.Headers.ToDictionary(x => x.Key.ToLowerInvariant(), x => x.Value.First()); var resBody = await result.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);