From ee83e4cca56d086476b5cb6f92d931fb9bbb677f Mon Sep 17 00:00:00 2001 From: Stepan Goremykin Date: Sat, 26 Aug 2023 17:29:00 +0200 Subject: [PATCH] Remove redundant method --- .../Manager/ProviderManager.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs index 121be88d13..f3211ba450 100644 --- a/MediaBrowser.Providers/Manager/ProviderManager.cs +++ b/MediaBrowser.Providers/Manager/ProviderManager.cs @@ -765,10 +765,12 @@ namespace MediaBrowser.Providers.Manager { try { - var results = await GetSearchResults(provider, searchInfo.SearchInfo, cancellationToken).ConfigureAwait(false); + var results = await provider.GetSearchResults(searchInfo.SearchInfo, cancellationToken).ConfigureAwait(false); foreach (var result in results) { + result.SearchProviderName = provider.Name; + var existingMatch = resultList.FirstOrDefault(i => i.ProviderIds.Any(p => string.Equals(result.GetProviderId(p.Key), p.Value, StringComparison.OrdinalIgnoreCase))); if (existingMatch is null) @@ -800,20 +802,6 @@ namespace MediaBrowser.Providers.Manager return resultList; } - private async Task> GetSearchResults( - IRemoteSearchProvider provider, - TLookupType searchInfo, - CancellationToken cancellationToken) - where TLookupType : ItemLookupInfo - { - var results = await provider.GetSearchResults(searchInfo, cancellationToken).ConfigureAwait(false); - return results.Select(result => - { - result.SearchProviderName = provider.Name; - return result; - }); - } - private IEnumerable GetExternalIds(IHasProviderIds item) { return _externalIds.Where(i =>