2 Commits
Author SHA1 Message Date
jim c09c180f1a Merge branch 'claude/blogs-likes-criteria-5dca9a' into master 2026-10-21 14:18:14 -05:00
jimandClaude Opus 5.5 a3a54a12fe feat(likes): skip blogs that have never left a note
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 14:18:14 -05:00
+2 -4
View File
@@ -1366,8 +1366,7 @@ namespace URLNotesGrabberCORE
} }
else else
{ {
// Least recently refreshed first; within that, blogs that have left a note before those // Only blogs that have left a note; least recently refreshed first, then earliest first note
// that never have, earliest first note first
string dueFilter = ignoreCooldown ? string.Empty : @" string dueFilter = ignoreCooldown ? string.Empty : @"
AND ( AND (
COALESCE(B.LikesPulled, 0) = 0 COALESCE(B.LikesPulled, 0) = 0
@@ -1379,12 +1378,11 @@ namespace URLNotesGrabberCORE
COALESCE(B.LikesCursor, 0), COALESCE(B.LikesCursor, 0),
COALESCE(B.LikesNewestTimestamp, 0) COALESCE(B.LikesNewestTimestamp, 0)
FROM Blogs B 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) + @" FROM Notes N" + WhereIsActive("Notes", "N", DBPath) + @"
GROUP BY N.NoteBlogId) F ON F.NoteBlogId = B.BlogId GROUP BY N.NoteBlogId) F ON F.NoteBlogId = B.BlogId
WHERE B.IsActive = 1" + dueFilter + @" WHERE B.IsActive = 1" + dueFilter + @"
ORDER BY COALESCE(B.LikesLastRefreshed, 0), ORDER BY COALESCE(B.LikesLastRefreshed, 0),
F.FirstNoteTs IS NULL,
F.FirstNoteTs, F.FirstNoteTs,
B.BlogName;"; B.BlogName;";
} }