Skip to content

Commit

Permalink
Tweak AI to prioritise recent photos
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Mar 21, 2024
1 parent 9d8e672 commit 3d5bf28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Damselfly.Core/Services/ImageRecognitionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public async Task<ICollection<IProcessJob>> 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();
Expand Down

0 comments on commit 3d5bf28

Please sign in to comment.