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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user