mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Fix a few multiple enumerations
This commit is contained in:
parent
3ee1141a06
commit
0ed2aa6f06
@ -358,7 +358,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
var children = item.IsFolder
|
||||
? ((Folder)item).GetRecursiveChildren(false)
|
||||
: Enumerable.Empty<BaseItem>();
|
||||
: Array.Empty<BaseItem>();
|
||||
|
||||
foreach (var metadataPath in GetMetadataPaths(item, children))
|
||||
{
|
||||
|
@ -807,13 +807,11 @@ namespace MediaBrowser.Providers.Manager
|
||||
where TLookupType : ItemLookupInfo
|
||||
{
|
||||
var results = await provider.GetSearchResults(searchInfo, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
foreach (var item in results)
|
||||
return results.Select(result =>
|
||||
{
|
||||
item.SearchProviderName = provider.Name;
|
||||
}
|
||||
|
||||
return results;
|
||||
result.SearchProviderName = provider.Name;
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
private IEnumerable<IExternalId> GetExternalIds(IHasProviderIds item)
|
||||
|
Loading…
Reference in New Issue
Block a user