Add field downloadLocation to Connector to save archives.
This commit is contained in:
parent
73df8ad213
commit
b15e032038
@ -6,7 +6,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
MangaDex mangaDexConnector = new MangaDex();
|
MangaDex mangaDexConnector = new MangaDex("D:");
|
||||||
Publication[] publications = mangaDexConnector.GetPublications();
|
Publication[] publications = mangaDexConnector.GetPublications();
|
||||||
Console.ReadKey();
|
Console.ReadKey();
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ namespace Tranga;
|
|||||||
|
|
||||||
public abstract class Connector
|
public abstract class Connector
|
||||||
{
|
{
|
||||||
|
internal abstract string downloadLocation { get; }
|
||||||
public abstract string name { get; }
|
public abstract string name { get; }
|
||||||
public abstract Publication[] GetPublications();
|
public abstract Publication[] GetPublications();
|
||||||
public abstract Chapter[] GetChapters(Publication publication);
|
public abstract Chapter[] GetChapters(Publication publication);
|
||||||
|
@ -5,12 +5,14 @@ namespace Tranga.Connectors;
|
|||||||
|
|
||||||
public class MangaDex : Connector
|
public class MangaDex : Connector
|
||||||
{
|
{
|
||||||
|
internal override string downloadLocation { get; }
|
||||||
public override string name { get; }
|
public override string name { get; }
|
||||||
private DownloadClient _downloadClient = new ();
|
private DownloadClient _downloadClient = new ();
|
||||||
|
|
||||||
public MangaDex()
|
public MangaDex(string downloadLocation)
|
||||||
{
|
{
|
||||||
name = "MangaDex.org";
|
name = "MangaDex.org";
|
||||||
|
this.downloadLocation = downloadLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override Publication[] GetPublications()
|
public override Publication[] GetPublications()
|
||||||
|
Loading…
Reference in New Issue
Block a user