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 * Origin is now supported as a game source
* Basic (mostly untested) support for Dragon Age : Origins * 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 * 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 #### Version - 2.3.6.2 - 12/31/2020
* HOTFIX: Also apply the IPS4 changes to LL Meta lookups * 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() public async Task<Http.Client> GetAuthedClient()
{ {
Helpers.Cookie[] cookies; Helpers.Cookie[] cookies;
if (Consts.IsServer) if (Consts.IsServer || IsCloudFlareProtected)
{ {
try 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; ModInfo info;
try try
{ {
@ -198,8 +198,7 @@ namespace Wabbajack.Lib.Downloaders
string url; string url;
try try
{ {
var client = await NexusApiClient.Get(); url = await DownloadDispatcher.GetInstance<NexusDownloader>().Client!.GetNexusDownloadLink(this);
url = await client.GetNexusDownloadLink(this);
} }
catch (NexusAPIQuotaExceeded ex) catch (NexusAPIQuotaExceeded ex)
{ {
@ -218,7 +217,7 @@ namespace Wabbajack.Lib.Downloaders
{ {
try try
{ {
var client = await NexusApiClient.Get(); var client = DownloadDispatcher.GetInstance<NexusDownloader>().Client!;
var modInfo = await client.GetModInfo(Game, ModID); var modInfo = await client.GetModInfo(Game, ModID);
if (!modInfo.available) return false; if (!modInfo.available) return false;
var modFiles = await client.GetModFiles(Game, ModID); var modFiles = await client.GetModFiles(Game, ModID);

View File

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