mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Change how we display downloading files in the UI
This commit is contained in:
parent
84e91e28f7
commit
acf0bee082
@ -37,8 +37,8 @@ public class DownloadDispatcher
|
||||
|
||||
public async Task<Hash> Download(Archive a, AbsolutePath dest, CancellationToken token)
|
||||
{
|
||||
using var downloadScope = _logger.BeginScope("Downloading {primaryKeyString}", a.State.PrimaryKeyString);
|
||||
using var job = await _limiter.Begin(a.State.PrimaryKeyString, a.Size, token);
|
||||
using var downloadScope = _logger.BeginScope("Downloading {Name}", a.Name);
|
||||
using var job = await _limiter.Begin("Downloading " + a.Name, a.Size, token);
|
||||
return await Download(a, dest, job, token);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ public class NexusDownloader : ADownloader<Nexus>, IUrlDownloader
|
||||
private readonly IUserInterventionHandler _userInterventionHandler;
|
||||
private readonly IResource<IUserInterventionHandler> _interventionLimiter;
|
||||
|
||||
private const bool IsManualDebugMode = true;
|
||||
private const bool IsManualDebugMode = false;
|
||||
|
||||
public NexusDownloader(ILogger<NexusDownloader> logger, HttpClient client, IHttpDownloader downloader,
|
||||
NexusApi api, IUserInterventionHandler userInterventionHandler, IResource<IUserInterventionHandler> interventionLimiter)
|
||||
@ -115,7 +115,7 @@ public class NexusDownloader : ADownloader<Nexus>, IUrlDownloader
|
||||
public override async Task<Hash> Download(Archive archive, Nexus state, AbsolutePath destination,
|
||||
IJob job, CancellationToken token)
|
||||
{
|
||||
if (IsManualDebugMode || await _api.IsPremium(token))
|
||||
if (IsManualDebugMode || !(await _api.IsPremium(token)))
|
||||
{
|
||||
return await DownloadManually(archive, state, destination, job, token);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user