Add Publication to DownloadChapter Method, to later correctly save images.
This commit is contained in:
parent
140aac8f87
commit
317d1435f3
@ -7,7 +7,12 @@ public abstract class Connector
|
|||||||
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);
|
||||||
public abstract void DownloadChapter(Chapter chapter); //where to?
|
public abstract void DownloadChapter(Publication publication, Chapter chapter); //where to?
|
||||||
|
|
||||||
|
internal void DownloadChapter(string url)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
internal class DownloadClient
|
internal class DownloadClient
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ public class MangaDex : Connector
|
|||||||
return chapters.OrderBy(chapter => chapter.chapterNumber).ToArray();
|
return chapters.OrderBy(chapter => chapter.chapterNumber).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void DownloadChapter(Chapter chapter)
|
public override void DownloadChapter(Publication publication, Chapter chapter)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,11 @@ public class TrangaTask
|
|||||||
_task.Start();
|
_task.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TrangaTask CreateDownloadChapterTask(Connector connector, Chapter chapter, TimeSpan reoccurrence)
|
public static TrangaTask CreateDownloadChapterTask(Connector connector, Publication publication, Chapter chapter, TimeSpan reoccurrence)
|
||||||
{
|
{
|
||||||
void TaskAction()
|
void TaskAction()
|
||||||
{
|
{
|
||||||
connector.DownloadChapter(chapter);
|
connector.DownloadChapter(publication, chapter);
|
||||||
}
|
}
|
||||||
return new TrangaTask(TaskAction, reoccurrence);
|
return new TrangaTask(TaskAction, reoccurrence);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user