|
|
@ -61,10 +61,11 @@ public class ImageIndexService : IImageIndexService |
|
|
|
|
|
|
|
|
|
|
|
await Task.Run(() => |
|
|
|
await Task.Run(() => |
|
|
|
{ |
|
|
|
{ |
|
|
|
var files = imagesDir.Info |
|
|
|
var files = imagesDir |
|
|
|
.EnumerateFiles("*.*", SearchOption.AllDirectories) |
|
|
|
.EnumerateFiles("*.*", SearchOption.AllDirectories) |
|
|
|
.Where(info => LocalImageFile.SupportedImageExtensions.Contains(info.Extension)) |
|
|
|
.Where( |
|
|
|
.Select(info => new FilePath(info)); |
|
|
|
file => LocalImageFile.SupportedImageExtensions.Contains(file.Extension) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
Parallel.ForEach( |
|
|
|
Parallel.ForEach( |
|
|
|
files, |
|
|
|
files, |
|
|
|