Browse Source

Simplify image indexing with new FilePath methods

pull/240/head
Ionite 1 year ago
parent
commit
2f290aea57
No known key found for this signature in database
  1. 7
      StabilityMatrix.Core/Services/ImageIndexService.cs

7
StabilityMatrix.Core/Services/ImageIndexService.cs

@ -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,

Loading…
Cancel
Save