Update LINQ query according to code review feedback.

Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
Dixin 2021-09-20 00:27:51 -07:00 committed by GitHub
parent dc8420c7a2
commit 27e32083a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1414,8 +1414,7 @@ namespace MediaBrowser.Controller.Entities
protected virtual BaseItem[] LoadExtras(List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService)
{
return fileSystemChildren
.Where(child => child.IsDirectory)
.Where(folder => AllExtrasTypesFolderNames.ContainsKey(folder.Name))
.Where(child => child.IsDirectory && AllExtrasTypesFolderNames.ContainsKey(child.Name))
.SelectMany(folder => LibraryManager
.ResolvePaths(FileSystem.GetFiles(folder.FullName), directoryService, null, new LibraryOptions())
.OfType<Video>()