diff options
| author | Fernando Fernández <ferferga.fer@gmail.com> | 2020-11-19 23:18:25 +0100 |
|---|---|---|
| committer | Fernando Fernández <ferferga.fer@gmail.com> | 2020-11-19 23:18:25 +0100 |
| commit | e21e00cad514159e22ddf99f26a4f8c13e16cc52 (patch) | |
| tree | 993002ddcb4815660de00392a7498b9dbbfa973e /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 2deda0437d32016a0c73158840c9c04bc729b261 (diff) | |
| parent | b5ff91c28159695858f24f768b5f6b5b33c0680c (diff) | |
Merge remote-tracking branch 'upstream/master' into no-scaling
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index ad3c19618..5d47d1e40 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -94,7 +94,6 @@ using MediaBrowser.Model.System; using MediaBrowser.Model.Tasks; using MediaBrowser.Providers.Chapters; using MediaBrowser.Providers.Manager; -using MediaBrowser.Providers.Plugins.TheTvdb; using MediaBrowser.Providers.Plugins.Tmdb; using MediaBrowser.Providers.Subtitles; using MediaBrowser.XbmcMetadata.Providers; @@ -520,7 +519,6 @@ namespace Emby.Server.Implementations ServiceCollection.AddSingleton<IJsonSerializer, JsonSerializer>(); ServiceCollection.AddSingleton(_fileSystemManager); - ServiceCollection.AddSingleton<TvdbClientManager>(); ServiceCollection.AddSingleton<TmdbClientManager>(); ServiceCollection.AddSingleton(_networkManager); @@ -1070,7 +1068,6 @@ namespace Emby.Server.Implementations if (!string.IsNullOrEmpty(lastName) && cleanup) { // Attempt a cleanup of old folders. - versions.RemoveAt(x); try { Logger.LogDebug("Deleting {Path}", versions[x].Path); @@ -1080,6 +1077,8 @@ namespace Emby.Server.Implementations { Logger.LogWarning(e, "Unable to delete {Path}", versions[x].Path); } + + versions.RemoveAt(x); } } @@ -1378,7 +1377,7 @@ namespace Emby.Server.Implementations using var response = await _httpClientFactory.CreateClient(NamedClient.Default) .SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false); + await using var stream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); var result = await System.Text.Json.JsonSerializer.DeserializeAsync<string>(stream, JsonDefaults.GetOptions(), cancellationToken).ConfigureAwait(false); var valid = string.Equals(Name, result, StringComparison.OrdinalIgnoreCase); |
