From a1bd85daa5156acdf652439f86272f8cea6f47b4 Mon Sep 17 00:00:00 2001 From: glax <--local> Date: Thu, 18 May 2023 18:51:19 +0200 Subject: [PATCH] Moved field downloadLocation to abstract Connector class. --- Tranga/Connector.cs | 7 ++++++- Tranga/Connectors/MangaDex.cs | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Tranga/Connector.cs b/Tranga/Connector.cs index d4ff2ed..943551f 100644 --- a/Tranga/Connector.cs +++ b/Tranga/Connector.cs @@ -5,7 +5,12 @@ namespace Tranga; public abstract class Connector { - internal abstract string downloadLocation { get; } + public Connector(string downloadLocation) + { + this.downloadLocation = downloadLocation; + } + + internal string downloadLocation { get; } public abstract string name { get; } public abstract Publication[] GetPublications(string publicationTitle = ""); public abstract Chapter[] GetChapters(Publication publication, string language = ""); diff --git a/Tranga/Connectors/MangaDex.cs b/Tranga/Connectors/MangaDex.cs index 11b63df..49bfde7 100644 --- a/Tranga/Connectors/MangaDex.cs +++ b/Tranga/Connectors/MangaDex.cs @@ -7,14 +7,12 @@ namespace Tranga.Connectors; public class MangaDex : Connector { - internal override string downloadLocation { get; } public override string name { get; } private DownloadClient _downloadClient = new (750); - public MangaDex(string downloadLocation) + public MangaDex(string downloadLocation) : base(downloadLocation) { name = "MangaDex.org"; - this.downloadLocation = downloadLocation; } public override Publication[] GetPublications(string publicationTitle = "")