diff --git a/Damselfly.Core/Services/ImageRecognitionService.cs b/Damselfly.Core/Services/ImageRecognitionService.cs index 0da81195..9cf7948f 100644 --- a/Damselfly.Core/Services/ImageRecognitionService.cs +++ b/Damselfly.Core/Services/ImageRecognitionService.cs @@ -181,7 +181,8 @@ public async Task> GetPendingJobs(int maxJobs) // and the AI hasn't been processed. var images = await db.ImageMetaData.Where(x => x.LastUpdated >= x.Image.LastUpdated && x.AILastUpdated == null ) - .OrderByDescending(x => x.LastUpdated) + .OrderByDescending(x => x.DateTaken) + .ThenByDescending(x => x.LastUpdated) .Take(maxJobs) .Select(x => x.ImageId) .ToListAsync();