Fix MEGA status percentage

This commit is contained in:
Unnoen 2021-05-01 19:48:28 +10:00
parent 011f680890
commit d608df5074
No known key found for this signature in database
GPG Key ID: 8F8E42252BA20553

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;
}