mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Ask the server for known upgrades as a last resource (for all downloads)
This commit is contained in:
parent
d79531fb8e
commit
d953fa9179
@ -101,7 +101,7 @@ namespace Wabbajack.Lib.Downloaders
|
||||
return string.Join("\n", GetMetaIni());
|
||||
}
|
||||
|
||||
public async Task<(Archive? Archive, TempFile NewFile)> ServerFindUpgrade(Archive a)
|
||||
public static async Task<(Archive? Archive, TempFile NewFile)> ServerFindUpgrade(Archive a)
|
||||
{
|
||||
var alternatives = await ClientAPI.GetModUpgrades(a.Hash);
|
||||
if (alternatives == default)
|
||||
|
@ -126,10 +126,13 @@ namespace Wabbajack.Lib.Downloaders
|
||||
var result = await FindUpgrade(archive);
|
||||
if (result == default)
|
||||
{
|
||||
Utils.Log(
|
||||
$"No solution for broken download {archive.Name} {archive.State.PrimaryKeyString} could be found");
|
||||
return DownloadResult.Failure;
|
||||
|
||||
result = await AbstractDownloadState.ServerFindUpgrade(archive);
|
||||
if (result == default)
|
||||
{
|
||||
Utils.Log(
|
||||
$"No solution for broken download {archive.Name} {archive.State.PrimaryKeyString} could be found");
|
||||
return DownloadResult.Failure;
|
||||
}
|
||||
}
|
||||
|
||||
Utils.Log($"Looking for patch for {archive.Name} ({(long)archive.Hash} {archive.Hash.ToHex()} -> {(long)result.Archive!.Hash} {result.Archive!.Hash.ToHex()})");
|
||||
|
Loading…
Reference in New Issue
Block a user