diff --git a/OF DL/Program.cs b/OF DL/Program.cs index b2c291e..8ac3364 100644 --- a/OF DL/Program.cs +++ b/OF DL/Program.cs @@ -1389,6 +1389,15 @@ public class Program } else if (hasSelectedUsersKVP.Key && !hasSelectedUsersKVP.Value.ContainsKey("ConfigChanged")) { + int totalNewPaidPostCount = 0; + int totalNewPostCount = 0; + int totalNewArchivedCount = 0; + int totalNewStreamsCount = 0; + int totalNewStoriesCount = 0; + int totalNewHighlightsCount = 0; + int totalNewMessagesCount = 0; + int totalNewPaidMessagesCount = 0; + //Iterate over each user in the list of users int userNum = 0; int userCount = hasSelectedUsersKVP.Value.Count; @@ -1459,44 +1468,52 @@ public class Program if (Config.DownloadPaidPosts) { (paidPostCount, newPaidPostCount) = await DownloadPaidPosts(downloadContext, hasSelectedUsersKVP, user, paidPostCount, path); + totalNewPaidPostCount += newPaidPostCount; } if (Config.DownloadPosts) { (postCount, newPostCount) = await DownloadFreePosts(downloadContext, hasSelectedUsersKVP, user, postCount, path); - } + totalNewPostCount += newPostCount; + } - if (Config.DownloadArchived) + if (Config.DownloadArchived) { (archivedCount, newArchivedCount) = await DownloadArchived(downloadContext, hasSelectedUsersKVP, user, archivedCount, path); - } + totalNewArchivedCount += newArchivedCount; + } - if (Config.DownloadStreams) + if (Config.DownloadStreams) { (streamsCount, newStreamsCount) = await DownloadStreams(downloadContext, hasSelectedUsersKVP, user, streamsCount, path); - } + totalNewStreamsCount += newStreamsCount; + } - if (Config.DownloadStories) + if (Config.DownloadStories) { (storiesCount, newStoriesCount) = await DownloadStories(downloadContext, user, storiesCount, path); - } + totalNewStoriesCount += newStoriesCount; + } - if (Config.DownloadHighlights) + if (Config.DownloadHighlights) { (highlightsCount, newHighlightsCount) = await DownloadHighlights(downloadContext, user, highlightsCount, path); - } + totalNewHighlightsCount += newHighlightsCount; + } - if (Config.DownloadMessages) + if (Config.DownloadMessages) { (messagesCount, newMessagesCount) = await DownloadMessages(downloadContext, hasSelectedUsersKVP, user, messagesCount, path); - } + totalNewMessagesCount += newMessagesCount; + } - if (Config.DownloadPaidMessages) + if (Config.DownloadPaidMessages) { (paidMessagesCount, newPaidMessagesCount) = await DownloadPaidMessages(downloadContext, hasSelectedUsersKVP, user, paidMessagesCount, path); - } + totalNewPaidMessagesCount += newPaidMessagesCount; + } - AnsiConsole.Markup("\n"); + AnsiConsole.Markup("\n"); AnsiConsole.Write(new BreakdownChart() .FullSize() .AddItem("Paid Posts", paidPostCount, Color.Red) @@ -1525,7 +1542,15 @@ public class Program DateTime endTime = DateTime.Now; TimeSpan totalTime = endTime - startTime; - Log.Information("Scrape Completed in {TotalMinutes:0.00} minutes", totalTime.TotalMinutes); + Log.ForContext("Paid Posts", totalNewPaidPostCount) + .ForContext("Posts", totalNewPostCount) + .ForContext("Archived", totalNewArchivedCount) + .ForContext("Streams", totalNewStreamsCount) + .ForContext("Stories", totalNewStoriesCount) + .ForContext("Highlights", totalNewHighlightsCount) + .ForContext("Messages", totalNewMessagesCount) + .ForContext("Paid Messages", totalNewPaidMessagesCount) + .Information("Scrape Completed in {TotalMinutes:0.00} minutes", totalTime.TotalMinutes); AnsiConsole.Markup($"[green]Scrape Completed in {totalTime.TotalMinutes:0.00} minutes\n[/]"); } else if (hasSelectedUsersKVP.Key && hasSelectedUsersKVP.Value != null && hasSelectedUsersKVP.Value.ContainsKey("ConfigChanged"))