From f2539dc9d0f0c5135924c211bb099d4ed7c1be5d Mon Sep 17 00:00:00 2001 From: jim Date: Thu, 7 May 2026 14:25:00 -0500 Subject: [PATCH] fix: mark post's replies '?' on confirmed empty notes response When the API responds 200 OK with notes:[] on the first page, the post has no conversational notes per Tumblr. Stamp all the post's reply rows '?' so the per-iteration requery stops handing this post back forever. Only fires for first-page 200 OK so a later-page empty (end of pagination) doesn't poison good rows. --- URLNotesGrabberCORE/Program.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/URLNotesGrabberCORE/Program.cs b/URLNotesGrabberCORE/Program.cs index d1d5cb8..f9a5c98 100644 --- a/URLNotesGrabberCORE/Program.cs +++ b/URLNotesGrabberCORE/Program.cs @@ -488,6 +488,16 @@ namespace URLNotesGrabberCORE var raw = postsResponse?.rawJson ?? string.Empty; if (raw.Length > 500) raw = raw.Substring(0, 500) + "...[truncated]"; Console.WriteLine($"[Reply Text] raw: {raw}"); + + // First-page 200 OK with empty notes = post has no conversational notes per Tumblr. + // Mark all the post's replies '?' so the work queue stops handing this post back. + if (page == 1 && postsResponse?.meta?.status == 200) + { + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine($"[Reply Text] Marking all replies for {blogName}/{postID} '?' (200 OK with no conversational notes)"); + Console.ForegroundColor = prevColor; + DataAccess.UpdateAllNoteReplyTextForPost(blogName, postID, "?"); + } break; }