mirror of
https://github.com/SabreTools/SabreTools.RedumpLib.git
synced 2026-09-22 15:04:34 +00:00
Only add processed IDs on success for range-based downloads
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user