diff --git a/Tranga/Connector.cs b/Tranga/Connector.cs index b04bd28..8d31a0a 100644 --- a/Tranga/Connector.cs +++ b/Tranga/Connector.cs @@ -6,7 +6,7 @@ public abstract class Connector { internal abstract string downloadLocation { get; } public abstract string name { get; } - public abstract Publication[] GetPublications(); + public abstract Publication[] GetPublications(string publicationTitle = ""); public abstract Chapter[] GetChapters(Publication publication); public abstract void DownloadChapter(Publication publication, Chapter chapter); //where to? diff --git a/Tranga/Connectors/MangaDex.cs b/Tranga/Connectors/MangaDex.cs index 6bf293a..50fec60 100644 --- a/Tranga/Connectors/MangaDex.cs +++ b/Tranga/Connectors/MangaDex.cs @@ -15,10 +15,10 @@ public class MangaDex : Connector this.downloadLocation = downloadLocation; } - public override Publication[] GetPublications() + public override Publication[] GetPublications(string publicationTitle = "") { const int limit = 100; - string publicationsUrl = $"https://api.mangadex.org/manga?limit={limit}&offset="; + string publicationsUrl = $"https://api.mangadex.org/manga?limit={limit}&title={publicationTitle}&offset="; int offset = 0; int total = int.MaxValue; HashSet publications = new();