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
|
try
|
||||||
{
|
{
|
||||||
using var megaDownloadStream = await megaClient.DownloadAsync(new Uri(MirrorInfo.Link), progress);
|
var file = new FileInfo(Path.Join(DownloadCacheHelper.CachePath, "patcher"));
|
||||||
|
|
||||||
|
await megaClient.DownloadFileAsync(new Uri(MirrorInfo.Link),
|
||||||
|
file.FullName, progress);
|
||||||
|
|
||||||
|
file.Refresh();
|
||||||
|
|
||||||
var file = await DownloadCacheHelper.DownloadFileAsync("patcher", megaDownloadStream);
|
if (!file.Exists)
|
||||||
|
|
||||||
if (file == null)
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return FileHashHelper.CheckHash(file, MirrorInfo.Hash) ? file : null;
|
return FileHashHelper.CheckHash(file, MirrorInfo.Hash) ? file : null;
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
<PackageIcon>icon.ico</PackageIcon>
|
<PackageIcon>icon.ico</PackageIcon>
|
||||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release;TEST</Configurations>
|
<Configurations>Debug;Release;TEST</Configurations>
|
||||||
<AssemblyVersion>2.42</AssemblyVersion>
|
<AssemblyVersion>2.43</AssemblyVersion>
|
||||||
<FileVersion>2.42</FileVersion>
|
<FileVersion>2.43</FileVersion>
|
||||||
<Company>SPT-AKI</Company>
|
<Company>SPT-AKI</Company>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user