Update LINQ query according to code review feedback.
Co-authored-by: Claus Vium <cvium@users.noreply.github.com>
This commit is contained in:
parent
dc8420c7a2
commit
27e32083a1
|
@ -1414,8 +1414,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
protected virtual BaseItem[] LoadExtras(List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService)
|
protected virtual BaseItem[] LoadExtras(List<FileSystemMetadata> fileSystemChildren, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
return fileSystemChildren
|
return fileSystemChildren
|
||||||
.Where(child => child.IsDirectory)
|
.Where(child => child.IsDirectory && AllExtrasTypesFolderNames.ContainsKey(child.Name))
|
||||||
.Where(folder => AllExtrasTypesFolderNames.ContainsKey(folder.Name))
|
|
||||||
.SelectMany(folder => LibraryManager
|
.SelectMany(folder => LibraryManager
|
||||||
.ResolvePaths(FileSystem.GetFiles(folder.FullName), directoryService, null, new LibraryOptions())
|
.ResolvePaths(FileSystem.GetFiles(folder.FullName), directoryService, null, new LibraryOptions())
|
||||||
.OfType<Video>()
|
.OfType<Video>()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user