From 4f00adcc05d6c58b002eb48b1e4b75c4dbca14e6 Mon Sep 17 00:00:00 2001 From: jim Date: Sat, 9 May 2026 20:24:50 -0500 Subject: [PATCH] fix: -collect mode now processes all posts instead of exiting after first Changed CollectNotes from async void to async Task and await it with .GetAwaiter().GetResult() to match the pattern used by -replies and -likes. Previously the method would return immediately after the first await, causing Main to exit before the loop could process more than one post. Co-Authored-By: Claude Opus 4.7 --- URLNotesGrabberCORE/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/URLNotesGrabberCORE/Program.cs b/URLNotesGrabberCORE/Program.cs index 5b936f8..ddd70dd 100644 --- a/URLNotesGrabberCORE/Program.cs +++ b/URLNotesGrabberCORE/Program.cs @@ -244,7 +244,7 @@ namespace URLNotesGrabberCORE } } - CollectNotes(settings.GetValue("PathOutput"), withoutNotesOnly, beforeDate); + CollectNotes(settings.GetValue("PathOutput"), withoutNotesOnly, beforeDate).GetAwaiter().GetResult(); break; case "-blogsR": //collect notes from all posts @@ -1073,7 +1073,7 @@ namespace URLNotesGrabberCORE return "UNKNOWN"; } - static async void CollectNotes(string outPath, bool withoutNotesOnly = true, DateTime? beforeDate = null) + static async Task CollectNotes(string outPath, bool withoutNotesOnly = true, DateTime? beforeDate = null) { List> posts = DataAccess.GetPosts(withoutNotesOnly, beforeDate);