Small downloader fixes

This commit is contained in:
Timothy Baldridge 2021-01-06 06:02:12 -07:00
parent d81b9026d4
commit d854845d17
4 changed files with 7 additions and 8 deletions

View File

@ -5,6 +5,8 @@
* Origin is now supported as a game source
* Basic (mostly untested) support for Dragon Age : Origins
* Replace RocksDB with SQLite should result in less process contention when running the UI and the CLI at the same time
* Fixed Regression with CloudFront IPS4 sites not requesting logins before installation
* Fixed regression that caused us to spam the Nexus with verify calls
#### Version - 2.3.6.2 - 12/31/2020
* HOTFIX: Also apply the IPS4 changes to LL Meta lookups

View File

@ -92,7 +92,7 @@ namespace Wabbajack.Lib.Downloaders
public async Task<Http.Client> GetAuthedClient()
{
Helpers.Cookie[] cookies;
if (Consts.IsServer)
if (Consts.IsServer || IsCloudFlareProtected)
{
try
{

View File

@ -66,7 +66,7 @@ namespace Wabbajack.Lib.Downloaders
};
}
var client = await NexusApiClient.Get();
var client = DownloadDispatcher.GetInstance<NexusDownloader>().Client ?? await NexusApiClient.Get();
ModInfo info;
try
{
@ -198,8 +198,7 @@ namespace Wabbajack.Lib.Downloaders
string url;
try
{
var client = await NexusApiClient.Get();
url = await client.GetNexusDownloadLink(this);
url = await DownloadDispatcher.GetInstance<NexusDownloader>().Client!.GetNexusDownloadLink(this);
}
catch (NexusAPIQuotaExceeded ex)
{
@ -218,7 +217,7 @@ namespace Wabbajack.Lib.Downloaders
{
try
{
var client = await NexusApiClient.Get();
var client = DownloadDispatcher.GetInstance<NexusDownloader>().Client!;
var modInfo = await client.GetModInfo(Game, ModID);
if (!modInfo.available) return false;
var modFiles = await client.GetModFiles(Game, ModID);

View File

@ -34,9 +34,7 @@ namespace Wabbajack.Lib.NexusApi
{
get
{
if (_userStatus == null)
_userStatus = GetUserStatus();
return _userStatus;
return _userStatus ??= GetUserStatus();
}
}