From a3a54a12fe91fe134c011c08e11c049e3827390d Mon Sep 17 00:00:00 2001 From: jim Date: Wed, 21 Oct 2026 14:18:14 -0500 Subject: [PATCH] feat(likes): skip blogs that have never left a note Co-Authored-By: Claude Opus 5.5 --- URLNotesGrabberCORE/DataAccess.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/URLNotesGrabberCORE/DataAccess.cs b/URLNotesGrabberCORE/DataAccess.cs index 42a6d5f..3dee8a5 100644 --- a/URLNotesGrabberCORE/DataAccess.cs +++ b/URLNotesGrabberCORE/DataAccess.cs @@ -1366,8 +1366,7 @@ namespace URLNotesGrabberCORE } else { - // Least recently refreshed first; within that, blogs that have left a note before those - // that never have, earliest first note first + // Only blogs that have left a note; least recently refreshed first, then earliest first note string dueFilter = ignoreCooldown ? string.Empty : @" AND ( COALESCE(B.LikesPulled, 0) = 0 @@ -1379,12 +1378,11 @@ namespace URLNotesGrabberCORE COALESCE(B.LikesCursor, 0), COALESCE(B.LikesNewestTimestamp, 0) FROM Blogs B - LEFT JOIN (SELECT N.NoteBlogId, MIN(N.TimeStamp) AS FirstNoteTs + INNER JOIN (SELECT N.NoteBlogId, MIN(N.TimeStamp) AS FirstNoteTs FROM Notes N" + WhereIsActive("Notes", "N", DBPath) + @" GROUP BY N.NoteBlogId) F ON F.NoteBlogId = B.BlogId WHERE B.IsActive = 1" + dueFilter + @" ORDER BY COALESCE(B.LikesLastRefreshed, 0), - F.FirstNoteTs IS NULL, F.FirstNoteTs, B.BlogName;"; }