mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix Nexus tests
This commit is contained in:
parent
581c34c0b0
commit
b260223bf5
@ -228,8 +228,10 @@ namespace Wabbajack.VirtualFileSystem.Test
|
|||||||
|
|
||||||
private static async Task<AbsolutePath> DownloadMod(Game game, int mod)
|
private static async Task<AbsolutePath> DownloadMod(Game game, int mod)
|
||||||
{
|
{
|
||||||
using var client = await NexusApiClient.Get();
|
var client = DownloadDispatcher.GetInstance<NexusDownloader>();
|
||||||
var results = await client.GetModFiles(game, mod);
|
await client.Prepare();
|
||||||
|
|
||||||
|
var results = await client.Client!.GetModFiles(game, mod);
|
||||||
var file = results.files.FirstOrDefault(f => f.is_primary) ??
|
var file = results.files.FirstOrDefault(f => f.is_primary) ??
|
||||||
results.files.OrderByDescending(f => f.uploaded_timestamp).First();
|
results.files.OrderByDescending(f => f.uploaded_timestamp).First();
|
||||||
return await DownloadNexusFile(game, mod, file);
|
return await DownloadNexusFile(game, mod, file);
|
||||||
@ -253,8 +255,10 @@ namespace Wabbajack.VirtualFileSystem.Test
|
|||||||
|
|
||||||
public static async Task<AbsolutePath> DownloadMod(Game game, int mod, int fileId)
|
public static async Task<AbsolutePath> DownloadMod(Game game, int mod, int fileId)
|
||||||
{
|
{
|
||||||
using var client = await NexusApiClient.Get();
|
var client = DownloadDispatcher.GetInstance<NexusDownloader>();
|
||||||
var results = await client.GetModFiles(game, mod);
|
await client.Prepare();
|
||||||
|
|
||||||
|
var results = await client.Client!.GetModFiles(game, mod);
|
||||||
var file = results.files.FirstOrDefault(f => f.file_id == fileId);
|
var file = results.files.FirstOrDefault(f => f.file_id == fileId);
|
||||||
return await DownloadNexusFile(game, mod, file);
|
return await DownloadNexusFile(game, mod, file);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user