2
0

offset is increased at start of loop to prevent multiple attempts at downloading same list.

This commit is contained in:
glax 2023-05-18 16:03:27 +02:00
parent 6f128ea044
commit 71d09229da

View File

@ -22,6 +22,7 @@ public class MangaDex : Connector
HashSet<Publication> publications = new();
while (offset < total)
{
offset += limit;
DownloadClient.RequestResult requestResult = _downloadClient.GetPage(string.Concat(publicationsUrl, "0"));
JsonObject? result = JsonSerializer.Deserialize<JsonObject>(requestResult.result);
if (result is null)
@ -96,7 +97,6 @@ public class MangaDex : Connector
);
publications.Add(pub);
}
offset += limit;
}
return publications.ToArray();