2
0

Add field downloadLocation to Connector to save archives.

This commit is contained in:
glax 2023-05-18 16:40:11 +02:00
parent 73df8ad213
commit b15e032038
3 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ public class Program
{
public static void Main(string[] args)
{
MangaDex mangaDexConnector = new MangaDex();
MangaDex mangaDexConnector = new MangaDex("D:");
Publication[] publications = mangaDexConnector.GetPublications();
Console.ReadKey();
}

View File

@ -4,6 +4,7 @@ namespace Tranga;
public abstract class Connector
{
internal abstract string downloadLocation { get; }
public abstract string name { get; }
public abstract Publication[] GetPublications();
public abstract Chapter[] GetChapters(Publication publication);

View File

@ -5,12 +5,14 @@ namespace Tranga.Connectors;
public class MangaDex : Connector
{
internal override string downloadLocation { get; }
public override string name { get; }
private DownloadClient _downloadClient = new ();
public MangaDex()
public MangaDex(string downloadLocation)
{
name = "MangaDex.org";
this.downloadLocation = downloadLocation;
}
public override Publication[] GetPublications()