Merge pull request #1433 from Unnoen/IPS4-verify-and-MEGA-fixes

Fix IPS4 verification and MEGA status percentage.
This commit is contained in:
Timothy Baldridge 2021-05-21 08:11:38 -07:00 committed by GitHub
commit ce8f412744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -250,6 +250,12 @@ namespace Wabbajack.Lib.Downloaders
return false;
}
if (quickMode)
{
streamResult.Dispose();
return true;
}
await using (var os = await path.Create())
await using (var ins = await streamResult.Content.ReadAsStreamAsync())
{

View File

@ -175,7 +175,9 @@ namespace Wabbajack.Lib.Downloaders
var fileLink = new Uri(Url);
Utils.Status($"Downloading MEGA file: {a.Name}");
await MegaApiClient.DownloadFileAsync(fileLink, (string)destination, new Progress<double>(p => Utils.Status($"Downloading MEGA File: {a.Name}", Percent.FactoryPutInRange(p))));
await MegaApiClient.DownloadFileAsync(fileLink, (string)destination, new Progress<double>(p =>
Utils.Status($"Downloading MEGA File: {a.Name}", Percent.FactoryPutInRange(p / 100d))
));
return true;
}