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:
IsWaffle 2024-03-19 15:32:24 +00:00
commit 7d8fef2245
3 changed files with 7 additions and 3 deletions

View File

@ -139,6 +139,8 @@ public static class DownloadCacheHelper
}
patcherFileStream.Close();
outputFile.Refresh();
if (!outputFile.Exists)
{

View File

@ -1,6 +1,7 @@
using CG.Web.MegaApiClient;
using SPTInstaller.Helpers;
using System.Threading.Tasks;
using Serilog;
namespace SPTInstaller.Models.Mirrors.Downloaders;
public class MegaMirrorDownloader : MirrorDownloaderBase
@ -29,8 +30,9 @@ public class MegaMirrorDownloader : MirrorDownloaderBase
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.
return null;
}

View File

@ -9,8 +9,8 @@
<PackageIcon>icon.ico</PackageIcon>
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
<Configurations>Debug;Release;TEST</Configurations>
<AssemblyVersion>2.30</AssemblyVersion>
<FileVersion>2.30</FileVersion>
<AssemblyVersion>2.31</AssemblyVersion>
<FileVersion>2.31</FileVersion>
<Company>SPT-AKI</Company>
</PropertyGroup>