From 6e1a0ab06c57f40dc1c7e9aa8f7a6deefdc1ee7e Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 27 Aug 2023 01:15:02 +0200 Subject: [PATCH] Corrected order of constructor (GlobalBase clone) --- Tranga/MangaConnectors/DownloadClient.cs | 2 +- Tranga/MangaConnectors/MangaDex.cs | 4 ++-- Tranga/MangaConnectors/MangaKatana.cs | 4 ++-- Tranga/MangaConnectors/Manganato.cs | 4 ++-- Tranga/MangaConnectors/Mangasee.cs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Tranga/MangaConnectors/DownloadClient.cs b/Tranga/MangaConnectors/DownloadClient.cs index c5abbc4..c34ab25 100644 --- a/Tranga/MangaConnectors/DownloadClient.cs +++ b/Tranga/MangaConnectors/DownloadClient.cs @@ -20,7 +20,7 @@ internal class DownloadClient : GlobalBase private readonly Dictionary _lastExecutedRateLimit; private readonly Dictionary _rateLimit; - public DownloadClient(Dictionary rateLimitRequestsPerMinute, GlobalBase clone) : base(clone) + public DownloadClient(GlobalBase clone, Dictionary rateLimitRequestsPerMinute) : base(clone) { _lastExecutedRateLimit = new(); _rateLimit = new(); diff --git a/Tranga/MangaConnectors/MangaDex.cs b/Tranga/MangaConnectors/MangaDex.cs index 25c43ea..21900c1 100644 --- a/Tranga/MangaConnectors/MangaDex.cs +++ b/Tranga/MangaConnectors/MangaDex.cs @@ -21,14 +21,14 @@ public class MangaDex : MangaConnector public MangaDex(GlobalBase clone) : base(clone) { name = "MangaDex"; - this.downloadClient = new DownloadClient(new Dictionary() + this.downloadClient = new DownloadClient(clone, new Dictionary() { {(byte)RequestType.Manga, 250}, {(byte)RequestType.Feed, 250}, {(byte)RequestType.AtHomeServer, 40}, {(byte)RequestType.CoverUrl, 250}, {(byte)RequestType.Author, 250} - }, clone); + }); } public override Publication[] GetPublications(string publicationTitle = "") diff --git a/Tranga/MangaConnectors/MangaKatana.cs b/Tranga/MangaConnectors/MangaKatana.cs index 70baee9..76fe5e3 100644 --- a/Tranga/MangaConnectors/MangaKatana.cs +++ b/Tranga/MangaConnectors/MangaKatana.cs @@ -13,10 +13,10 @@ public class MangaKatana : MangaConnector public MangaKatana(GlobalBase clone) : base(clone) { this.name = "MangaKatana"; - this.downloadClient = new DownloadClient(new Dictionary() + this.downloadClient = new DownloadClient(clone, new Dictionary() { {1, 60} - }, clone); + }); } public override Publication[] GetPublications(string publicationTitle = "") diff --git a/Tranga/MangaConnectors/Manganato.cs b/Tranga/MangaConnectors/Manganato.cs index 8467933..d090bf9 100644 --- a/Tranga/MangaConnectors/Manganato.cs +++ b/Tranga/MangaConnectors/Manganato.cs @@ -13,10 +13,10 @@ public class Manganato : MangaConnector public Manganato(GlobalBase clone) : base(clone) { this.name = "Manganato"; - this.downloadClient = new DownloadClient(new Dictionary() + this.downloadClient = new DownloadClient(clone, new Dictionary() { {1, 60} - }, clone); + }); } public override Publication[] GetPublications(string publicationTitle = "") diff --git a/Tranga/MangaConnectors/Mangasee.cs b/Tranga/MangaConnectors/Mangasee.cs index fe89a0c..75e99b0 100644 --- a/Tranga/MangaConnectors/Mangasee.cs +++ b/Tranga/MangaConnectors/Mangasee.cs @@ -18,10 +18,10 @@ public class Mangasee : MangaConnector public Mangasee(GlobalBase clone) : base(clone) { this.name = "Mangasee"; - this.downloadClient = new DownloadClient(new Dictionary() + this.downloadClient = new DownloadClient(clone, new Dictionary() { { 1, 60 } - }, clone); + }); Task d = new Task(DownloadBrowser); d.Start();