Browse Source

Remove redundant method

Stepan Goremykin 1 year ago
parent
commit
ee83e4cca5
1 changed files with 3 additions and 15 deletions
  1. 3 15
      MediaBrowser.Providers/Manager/ProviderManager.cs

+ 3 - 15
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<IEnumerable<RemoteSearchResult>> GetSearchResults<TLookupType>(
-            IRemoteSearchProvider<TLookupType> 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<IExternalId> GetExternalIds(IHasProviderIds item)
         {
             return _externalIds.Where(i =>