Skip to content

Commit c0b27b6

Browse files
committed
Use added date for empty page checks
1 parent 03b7195 commit c0b27b6

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

SabreTools.RedumpLib/Web/RedumpClient.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,8 +731,12 @@ public async Task<bool> DownloadSingleSiteID(int id, string? outDir, bool rename
731731
return false;
732732
}
733733

734+
// Check the added date as a backup
735+
oldResult = Constants.AddedRegex.Match(oldDiscPage);
736+
newResult = Constants.AddedRegex.Match(discPage);
737+
734738
// If the downloaded data is invalid or otherwise empty, skip it
735-
else if (oldResult.Success && !newResult.Success)
739+
if (oldResult.Success && !newResult.Success)
736740
{
737741
Console.WriteLine($"ID {paddedId} retieved an empty page, skipping...");
738742
return false;
@@ -910,8 +914,12 @@ public async Task<bool> DownloadSingleWIPID(int id, string? outDir, bool rename)
910914
return false;
911915
}
912916

917+
// Check the added date as a backup
918+
oldResult = Constants.AddedRegex.Match(oldDiscPage);
919+
newResult = Constants.AddedRegex.Match(discPage);
920+
913921
// If the downloaded data is invalid or otherwise empty, skip it
914-
else if (oldResult.Success && !newResult.Success)
922+
if (oldResult.Success && !newResult.Success)
915923
{
916924
Console.WriteLine($"ID {paddedId} retieved an empty page, skipping...");
917925
return false;

0 commit comments

Comments
 (0)