use downladofileasync
instead of downloadasync. This seems to give better performance
This commit is contained in:
parent
defe7053d3
commit
3352ce5e31
@ -21,11 +21,14 @@ public class MegaMirrorDownloader : MirrorDownloaderBase
|
||||
|
||||
try
|
||||
{
|
||||
using var megaDownloadStream = await megaClient.DownloadAsync(new Uri(MirrorInfo.Link), progress);
|
||||
var file = new FileInfo(Path.Join(DownloadCacheHelper.CachePath, "patcher"));
|
||||
|
||||
var file = await DownloadCacheHelper.DownloadFileAsync("patcher", megaDownloadStream);
|
||||
await megaClient.DownloadFileAsync(new Uri(MirrorInfo.Link),
|
||||
file.FullName, progress);
|
||||
|
||||
if (file == null)
|
||||
file.Refresh();
|
||||
|
||||
if (!file.Exists)
|
||||
return null;
|
||||
|
||||
return FileHashHelper.CheckHash(file, MirrorInfo.Hash) ? file : null;
|
||||
|
@ -9,8 +9,8 @@
|
||||
<PackageIcon>icon.ico</PackageIcon>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<Configurations>Debug;Release;TEST</Configurations>
|
||||
<AssemblyVersion>2.42</AssemblyVersion>
|
||||
<FileVersion>2.42</FileVersion>
|
||||
<AssemblyVersion>2.43</AssemblyVersion>
|
||||
<FileVersion>2.43</FileVersion>
|
||||
<Company>SPT-AKI</Company>
|
||||
</PropertyGroup>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user