From 340a2b7e43b7903246dfbc7a288a91cfcf31c97c Mon Sep 17 00:00:00 2001 From: glax <--local> Date: Thu, 18 May 2023 18:20:21 +0200 Subject: [PATCH] fixed bug where offset wasnt increasing --- Tranga/Connectors/MangaDex.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Tranga/Connectors/MangaDex.cs b/Tranga/Connectors/MangaDex.cs index 109a481..691f826 100644 --- a/Tranga/Connectors/MangaDex.cs +++ b/Tranga/Connectors/MangaDex.cs @@ -19,14 +19,12 @@ public class MangaDex : Connector public override Publication[] GetPublications(string publicationTitle = "") { const int limit = 100; - string publicationsUrl = $"https://api.mangadex.org/manga?limit={limit}&title={publicationTitle}&offset="; int offset = 0; int total = int.MaxValue; HashSet publications = new(); while (offset < total) { - offset += limit; - DownloadClient.RequestResult requestResult = _downloadClient.MakeRequest(string.Concat(publicationsUrl, "0")); + DownloadClient.RequestResult requestResult = _downloadClient.MakeRequest($"https://api.mangadex.org/manga?limit={limit}&title={publicationTitle}&offset={offset}"); JsonObject? result = JsonSerializer.Deserialize(requestResult.result); offset += limit; if (result is null)