forked from sim0n00ps/OF-DL
Added total new media counts context to "Scrape Completed" log
This commit is contained in:
parent
d0bbf051e3
commit
0ed02a9316
@ -1458,6 +1458,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;
|
||||
@ -1528,41 +1537,49 @@ 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)
|
||||
{
|
||||
(archivedCount, newArchivedCount) = await DownloadArchived(downloadContext, hasSelectedUsersKVP, user, archivedCount, path);
|
||||
totalNewArchivedCount += newArchivedCount;
|
||||
}
|
||||
|
||||
if (Config.DownloadStreams)
|
||||
{
|
||||
(streamsCount, newStreamsCount) = await DownloadStreams(downloadContext, hasSelectedUsersKVP, user, streamsCount, path);
|
||||
totalNewStreamsCount += newStreamsCount;
|
||||
}
|
||||
|
||||
if (Config.DownloadStories)
|
||||
{
|
||||
(storiesCount, newStoriesCount) = await DownloadStories(downloadContext, user, storiesCount, path);
|
||||
totalNewStoriesCount += newStoriesCount;
|
||||
}
|
||||
|
||||
if (Config.DownloadHighlights)
|
||||
{
|
||||
(highlightsCount, newHighlightsCount) = await DownloadHighlights(downloadContext, user, highlightsCount, path);
|
||||
totalNewHighlightsCount += newHighlightsCount;
|
||||
}
|
||||
|
||||
if (Config.DownloadMessages)
|
||||
{
|
||||
(messagesCount, newMessagesCount) = await DownloadMessages(downloadContext, hasSelectedUsersKVP, user, messagesCount, path);
|
||||
totalNewMessagesCount += newMessagesCount;
|
||||
}
|
||||
|
||||
if (Config.DownloadPaidMessages)
|
||||
{
|
||||
(paidMessagesCount, newPaidMessagesCount) = await DownloadPaidMessages(downloadContext, hasSelectedUsersKVP, user, paidMessagesCount, path);
|
||||
totalNewPaidMessagesCount += newPaidMessagesCount;
|
||||
}
|
||||
|
||||
AnsiConsole.Markup("\n");
|
||||
@ -1594,7 +1611,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"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user