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());
|
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);
|
var alternatives = await ClientAPI.GetModUpgrades(a.Hash);
|
||||||
if (alternatives == default)
|
if (alternatives == default)
|
||||||
|
@ -125,11 +125,14 @@ namespace Wabbajack.Lib.Downloaders
|
|||||||
|
|
||||||
var result = await FindUpgrade(archive);
|
var result = await FindUpgrade(archive);
|
||||||
if (result == default)
|
if (result == default)
|
||||||
|
{
|
||||||
|
result = await AbstractDownloadState.ServerFindUpgrade(archive);
|
||||||
|
if (result == default)
|
||||||
{
|
{
|
||||||
Utils.Log(
|
Utils.Log(
|
||||||
$"No solution for broken download {archive.Name} {archive.State.PrimaryKeyString} could be found");
|
$"No solution for broken download {archive.Name} {archive.State.PrimaryKeyString} could be found");
|
||||||
return DownloadResult.Failure;
|
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()})");
|
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