Update Gress

This commit is contained in:
Oleksii Holub
2022-02-16 14:30:26 +02:00
parent 51cc132e5d
commit 36b4a45f3a
8 changed files with 117 additions and 97 deletions

View File

@@ -14,6 +14,7 @@ using DiscordChatExporter.Core.Exceptions;
using DiscordChatExporter.Core.Exporting;
using DiscordChatExporter.Core.Exporting.Filtering;
using DiscordChatExporter.Core.Exporting.Partitioning;
using Gress;
namespace DiscordChatExporter.Cli.Commands.Base;
@@ -78,8 +79,7 @@ public abstract class ExportCommandBase : TokenCommandBase
{
try
{
await progressContext.StartTaskAsync(
$"{channel.Category.Name} / {channel.Name}",
await progressContext.StartTaskAsync($"{channel.Category.Name} / {channel.Name}",
async progress =>
{
var guild = await Discord.GetGuildAsync(channel.GuildId, innerCancellationToken);
@@ -98,7 +98,11 @@ public abstract class ExportCommandBase : TokenCommandBase
DateFormat
);
await Exporter.ExportChannelAsync(request, progress, innerCancellationToken);
await Exporter.ExportChannelAsync(
request,
progress.ToPercentageBased(),
innerCancellationToken
);
}
);
}

View File

@@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="CliFx" Version="2.2.1" />
<PackageReference Include="Spectre.Console" Version="0.43.0" />
<PackageReference Include="Gress" Version="1.2.0" />
<PackageReference Include="Gress" Version="2.0.1" />
</ItemGroup>
<ItemGroup>