fix: release 404 posts from -replies queue

Tumblr API 404s were leaving Posts.NotFound=0 and Notes.replyText='.',
so GetRepliesWithFilledText kept re-selecting the same dead post and
the loop spun forever. Mark NotFound=1 and replies '?' on 404.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
jim
2026-05-08 21:42:30 -05:00
co-authored by Claude Opus 4.7
parent acc5e885a8
commit 349b465f8a
+13
View File
@@ -492,6 +492,19 @@ namespace URLNotesGrabberCORE
var raw = postsResponse?.rawJson ?? string.Empty;
if (raw.Length > 500) raw = raw.Substring(0, 500) + "...[truncated]";
Console.WriteLine($"[Reply Text] raw: {raw}");
bool isNotFound = postsResponse?.meta?.status == 404
|| string.Equals(postsResponse?.statusCode, "NotFound", StringComparison.OrdinalIgnoreCase);
if (isNotFound)
{
var notFoundColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine($"[Reply Text] Post {blogName}.tumblr.com/post/{postID} returned 404 - marking NotFound=1 and replies '?'");
Console.ForegroundColor = notFoundColor;
DataAccess.UpdatePostMarkNotFound(blogName, postID);
rowsUpdated += DataAccess.UpdateAllNoteReplyTextForPost(blogName, postID, "?");
emptyReplyCount += rowsUpdated;
}
break;
}