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(() =>
{
var files = imagesDir.Info
var files = imagesDir
.EnumerateFiles("*.*", SearchOption.AllDirectories)
.Where(info => LocalImageFile.SupportedImageExtensions.Contains(info.Extension))
.Select(info => new FilePath(info));
.Where(
file => LocalImageFile.SupportedImageExtensions.Contains(file.Extension)
);
Parallel.ForEach(
files,

Loading…
Cancel
Save