Restrict some of the links we check that don't change very often

This commit is contained in:
Timothy Baldridge 2020-05-25 07:04:31 -06:00
parent 4581988ae6
commit 600516be3f
3 changed files with 7 additions and 0 deletions

View File

@ -243,6 +243,10 @@ TOP:
public bool ValidateUpgrade(AbstractDownloadState newArchiveState)
{
var httpState = (State)newArchiveState;
if (new Uri(httpState.Url).Host.EndsWith(".mediafire.com"))
return false;
return httpState.Url == Url;
}
}

View File

@ -203,6 +203,8 @@ namespace Wabbajack.Server.Services
return (archive, await FastNexusModStats(ns));
case ManualDownloader.State _:
return (archive, ArchiveStatus.Valid);
case ModDBDownloader.State _:
return (archive, ArchiveStatus.Valid);
default:
{
if (data.ArchiveStatus.TryGetValue((archive.State.PrimaryKeyString, archive.Hash),

View File

@ -39,6 +39,7 @@ namespace Wabbajack.Server.Services
case WabbajackCDNDownloader.State _:
case GoogleDriveDownloader.State _:
case ManualDownloader.State _:
case ModDBDownloader.State _:
case HTTPDownloader.State h when h.Url.StartsWith("https://wabbajack"):
isValid = true;
break;