forked from sim0n00ps/OF-DL
Added total new media counts context to "Scrape Completed" log
This commit is contained in:
parent
3855a5e862
commit
cf1564bc7f
@ -1389,6 +1389,15 @@ public class Program
|
|||||||
}
|
}
|
||||||
else if (hasSelectedUsersKVP.Key && !hasSelectedUsersKVP.Value.ContainsKey("ConfigChanged"))
|
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
|
//Iterate over each user in the list of users
|
||||||
int userNum = 0;
|
int userNum = 0;
|
||||||
int userCount = hasSelectedUsersKVP.Value.Count;
|
int userCount = hasSelectedUsersKVP.Value.Count;
|
||||||
@ -1459,41 +1468,49 @@ public class Program
|
|||||||
if (Config.DownloadPaidPosts)
|
if (Config.DownloadPaidPosts)
|
||||||
{
|
{
|
||||||
(paidPostCount, newPaidPostCount) = await DownloadPaidPosts(downloadContext, hasSelectedUsersKVP, user, paidPostCount, path);
|
(paidPostCount, newPaidPostCount) = await DownloadPaidPosts(downloadContext, hasSelectedUsersKVP, user, paidPostCount, path);
|
||||||
|
totalNewPaidPostCount += newPaidPostCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.DownloadPosts)
|
if (Config.DownloadPosts)
|
||||||
{
|
{
|
||||||
(postCount, newPostCount) = await DownloadFreePosts(downloadContext, hasSelectedUsersKVP, user, postCount, path);
|
(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);
|
(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);
|
(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);
|
(storiesCount, newStoriesCount) = await DownloadStories(downloadContext, user, storiesCount, path);
|
||||||
|
totalNewStoriesCount += newStoriesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Config.DownloadHighlights)
|
if (Config.DownloadHighlights)
|
||||||
{
|
{
|
||||||
(highlightsCount, newHighlightsCount) = await DownloadHighlights(downloadContext, user, highlightsCount, path);
|
(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);
|
(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);
|
(paidMessagesCount, newPaidMessagesCount) = await DownloadPaidMessages(downloadContext, hasSelectedUsersKVP, user, paidMessagesCount, path);
|
||||||
|
totalNewPaidMessagesCount += newPaidMessagesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnsiConsole.Markup("\n");
|
AnsiConsole.Markup("\n");
|
||||||
@ -1525,7 +1542,15 @@ public class Program
|
|||||||
|
|
||||||
DateTime endTime = DateTime.Now;
|
DateTime endTime = DateTime.Now;
|
||||||
TimeSpan totalTime = endTime - startTime;
|
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[/]");
|
AnsiConsole.Markup($"[green]Scrape Completed in {totalTime.TotalMinutes:0.00} minutes\n[/]");
|
||||||
}
|
}
|
||||||
else if (hasSelectedUsersKVP.Key && hasSelectedUsersKVP.Value != null && hasSelectedUsersKVP.Value.ContainsKey("ConfigChanged"))
|
else if (hasSelectedUsersKVP.Key && hasSelectedUsersKVP.Value != null && hasSelectedUsersKVP.Value.ContainsKey("ConfigChanged"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user