forked from sim0n00ps/OF-DL
Tweaked console outputs
This commit is contained in:
parent
76aaf969ea
commit
7042afc76a
@ -21,7 +21,7 @@ public class CajetanDownloadEventHandler : ICajetanDownloadEventHandler
|
||||
=> _eventHandler.OnMessage(message);
|
||||
|
||||
public void OnMessage(string message, string color)
|
||||
=> AnsiConsole.Markup($"[{color.ToLowerInvariant()}]{Markup.Escape(message)}\n[/]");
|
||||
=> AnsiConsole.MarkupLine($"[{color.ToLowerInvariant()}]{Markup.Escape(message)}[/]");
|
||||
|
||||
public void OnNoContentFound(string contentType)
|
||||
=> _eventHandler.OnNoContentFound(contentType);
|
||||
|
||||
@ -152,7 +152,11 @@ internal class Worker(IServiceProvider serviceProvider)
|
||||
|
||||
LoggerWithConfigContext(_configService.CurrentConfig, _cajetanConfig)
|
||||
.Information("Scraping Data for {UserCount} user(s)", usersToDownload.Count);
|
||||
eventHandler.OnMessage($"Scraping Data for {usersToDownload.Count} user(s)\n");
|
||||
|
||||
eventHandler.OnMessage(
|
||||
$"\nScraping Data for {usersToDownload.Count} user(s)\n" +
|
||||
$"{"======================================================================================================"}\n"
|
||||
);
|
||||
|
||||
foreach ((string username, long userId) in usersToDownload)
|
||||
{
|
||||
@ -322,7 +326,7 @@ internal class Worker(IServiceProvider serviceProvider)
|
||||
continue;
|
||||
|
||||
Log.Information("Getting Users from list '{ListName:l}' (Include Restricted: {IncludeRestrictedSubscriptions})", name, currentConfig.IncludeRestrictedSubscriptions);
|
||||
AnsiConsole.Markup($"[green]Getting Users from list '{name}' (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})\n[/]");
|
||||
AnsiConsole.MarkupLine($"[green]Getting Users from list '{name}' (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})[/]");
|
||||
|
||||
List<string> listUsernames = await _apiService.GetListUsers($"/lists/{listId}/users") ?? [];
|
||||
|
||||
@ -373,7 +377,7 @@ internal class Worker(IServiceProvider serviceProvider)
|
||||
async Task FetchUsersAsync()
|
||||
{
|
||||
Log.Information("Getting Active Subscriptions (Include Restricted: {IncludeRestrictedSubscriptions})", currentConfig.IncludeRestrictedSubscriptions);
|
||||
AnsiConsole.Markup($"[green]Getting Active Subscriptions (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})\n[/]");
|
||||
AnsiConsole.MarkupLine($"[green]Getting Active Subscriptions (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})[/]");
|
||||
|
||||
Dictionary<string, long>? activeSubs = await _apiService.GetActiveSubscriptions("/subscriptions/subscribes", currentConfig.IncludeRestrictedSubscriptions);
|
||||
AddToResult(activeSubs);
|
||||
@ -381,7 +385,7 @@ internal class Worker(IServiceProvider serviceProvider)
|
||||
if (currentConfig.IncludeExpiredSubscriptions)
|
||||
{
|
||||
Log.Information("Getting Expired Subscriptions (Include Restricted: {IncludeRestrictedSubscriptions})", currentConfig.IncludeRestrictedSubscriptions);
|
||||
AnsiConsole.Markup($"[green]Getting Expired Subscriptions (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})\n[/]");
|
||||
AnsiConsole.MarkupLine($"[green]Getting Expired Subscriptions (Include Restricted: {currentConfig.IncludeRestrictedSubscriptions})[/]");
|
||||
|
||||
Dictionary<string, long>? expiredSubs = await _apiService.GetExpiredSubscriptions("/subscriptions/subscribes", currentConfig.IncludeRestrictedSubscriptions);
|
||||
AddToResult(expiredSubs);
|
||||
@ -410,7 +414,7 @@ internal class Worker(IServiceProvider serviceProvider)
|
||||
|
||||
Dictionary<string, long> usersInNonNudeLists = await GetUsersFromSpecificListsAsync(result, [.. listNames]);
|
||||
|
||||
AnsiConsole.Markup($"[green]Updating Non-Nude collection with {usersInNonNudeLists.Count} Users[/]");
|
||||
AnsiConsole.MarkupLine($"[grey]Updating Non-Nude collection with {usersInNonNudeLists.Count} Users[/]");
|
||||
await _dbService.UpdateNonNudeCollectionAsync(usersInNonNudeLists);
|
||||
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user