From 71d09229dab623a12af68d6cdf318a651df598a1 Mon Sep 17 00:00:00 2001 From: glax <--local> Date: Thu, 18 May 2023 16:03:27 +0200 Subject: [PATCH] offset is increased at start of loop to prevent multiple attempts at downloading same list. --- Tranga/Connectors/MangaDex.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tranga/Connectors/MangaDex.cs b/Tranga/Connectors/MangaDex.cs index f34169d..234f79c 100644 --- a/Tranga/Connectors/MangaDex.cs +++ b/Tranga/Connectors/MangaDex.cs @@ -22,6 +22,7 @@ public class MangaDex : Connector HashSet publications = new(); while (offset < total) { + offset += limit; DownloadClient.RequestResult requestResult = _downloadClient.GetPage(string.Concat(publicationsUrl, "0")); JsonObject? result = JsonSerializer.Deserialize(requestResult.result); if (result is null) @@ -96,7 +97,6 @@ public class MangaDex : Connector ); publications.Add(pub); } - offset += limit; } return publications.ToArray();