Merge pull request 'fix mega download' (#53) from waffle.lord/SPT-AKI-Installer:mega-download-fix into master
Reviewed-on: CWX/SPT-AKI-Installer#53
This commit is contained in:
commit
7d8fef2245
@ -140,6 +140,8 @@ public static class DownloadCacheHelper
|
|||||||
|
|
||||||
patcherFileStream.Close();
|
patcherFileStream.Close();
|
||||||
|
|
||||||
|
outputFile.Refresh();
|
||||||
|
|
||||||
if (!outputFile.Exists)
|
if (!outputFile.Exists)
|
||||||
{
|
{
|
||||||
Log.Error("Failed to download file from stream: {name}", outputFileName);
|
Log.Error("Failed to download file from stream: {name}", outputFileName);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using CG.Web.MegaApiClient;
|
using CG.Web.MegaApiClient;
|
||||||
using SPTInstaller.Helpers;
|
using SPTInstaller.Helpers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace SPTInstaller.Models.Mirrors.Downloaders;
|
namespace SPTInstaller.Models.Mirrors.Downloaders;
|
||||||
public class MegaMirrorDownloader : MirrorDownloaderBase
|
public class MegaMirrorDownloader : MirrorDownloaderBase
|
||||||
@ -29,8 +30,9 @@ public class MegaMirrorDownloader : MirrorDownloaderBase
|
|||||||
|
|
||||||
return FileHashHelper.CheckHash(file, MirrorInfo.Hash) ? file : null;
|
return FileHashHelper.CheckHash(file, MirrorInfo.Hash) ? file : null;
|
||||||
}
|
}
|
||||||
catch
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
|
Log.Error(ex, "Exception thrown while downloading from mega");
|
||||||
//most likely a 509 (Bandwidth limit exceeded) due to mega's user quotas.
|
//most likely a 509 (Bandwidth limit exceeded) due to mega's user quotas.
|
||||||
return null;
|
return 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.30</AssemblyVersion>
|
<AssemblyVersion>2.31</AssemblyVersion>
|
||||||
<FileVersion>2.30</FileVersion>
|
<FileVersion>2.31</FileVersion>
|
||||||
<Company>SPT-AKI</Company>
|
<Company>SPT-AKI</Company>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user