From 4cedbe28e37ee1d713db22e2c6a6175f3f1e6dc8 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Tue, 28 Jul 2026 22:18:18 +0200 Subject: Apply review suggestion --- MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs index 3528099260..c4f4833857 100644 --- a/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs +++ b/MediaBrowser.Providers/Plugins/AudioDb/AudioDbArtistProvider.cs @@ -8,6 +8,7 @@ using System.Globalization; using System.IO; using System.Linq; using System.Net.Http; +using System.Net.Http.Json; using System.Text.Json; using System.Threading; using System.Threading.Tasks; @@ -100,13 +101,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb using var response = await _httpClientFactory.CreateClient(NamedClient.Default).GetAsync(url, cancellationToken).ConfigureAwait(false); response.EnsureSuccessStatusCode(); - var jsonStream = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - await using (jsonStream.ConfigureAwait(false)) - { - var obj = await JsonSerializer.DeserializeAsync(jsonStream, _jsonOptions, cancellationToken).ConfigureAwait(false); + var obj = await response.Content.ReadFromJsonAsync(_jsonOptions, cancellationToken).ConfigureAwait(false); - return obj?.artists ?? []; - } + return obj?.artists ?? []; } private RemoteSearchResult ToRemoteSearchResult(Artist artist) -- cgit v1.2.3