Only add processed IDs on success for range-based downloads

This commit is contained in:
Matt Nadareski
2026-02-28 16:18:07 -05:00
parent 78d7a5cab2
commit 3a03521385
2 changed files with 6 additions and 6 deletions

View File

@@ -149,10 +149,10 @@ namespace SabreTools.RedumpLib.Web
List<int> ids = [];
for (int id = minId; id <= maxId; id++)
{
ids.Add(id);
if (await client.DownloadSingleSiteID(id, outDir, true))
bool downloaded = await client.DownloadSingleSiteID(id, outDir, true);
if (downloaded)
{
// Intentional delay here so we don't flood the server
ids.Add(id);
DelayHelper.DelayRandom();
}
}

View File

@@ -33,10 +33,10 @@ namespace SabreTools.RedumpLib.Web
List<int> ids = [];
for (int id = minId; id <= maxId; id++)
{
ids.Add(id);
if (await client.DownloadSingleWIPID(id, outDir, true))
bool downloaded = await client.DownloadSingleWIPID(id, outDir, true);
if (downloaded)
{
// Intentional delay here so we don't flood the server
ids.Add(id);
DelayHelper.DelayRandom();
}
}