mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-12 06:47:53 +02:00
Rewrote entire Task-Structure:
TrangaTask now only contains essentials, derived classes contain specific information such as connectorName, publication, chapter, etc. Removed taskQueue system, instead all tasks are kept in _allTasks. Progress is being tracked in TrangaTask resolves #36 resolves #32 Added new TrangaTask: DownloadChapter to download single chapters. #35 Fixed duplicate file-access when writing settings.
This commit is contained in:
@ -3,6 +3,7 @@ using System.Net;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Nodes;
|
||||
using Logging;
|
||||
using Tranga.TrangaTasks;
|
||||
|
||||
namespace Tranga.Connectors;
|
||||
public class MangaDex : Connector
|
||||
@ -204,7 +205,7 @@ public class MangaDex : Connector
|
||||
return chapters.OrderBy(chapter => Convert.ToSingle(chapter.chapterNumber, chapterNumberFormatInfo)).ToArray();
|
||||
}
|
||||
|
||||
public override void DownloadChapter(Publication publication, Chapter chapter, TrangaTask parentTask)
|
||||
public override void DownloadChapter(Publication publication, Chapter chapter, DownloadChapterTask parentTask)
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Downloading Chapter-Info {publication.sortName} {publication.internalId} {chapter.volumeNumber}-{chapter.chapterNumber}");
|
||||
//Request URLs for Chapter-Images
|
||||
|
@ -2,6 +2,7 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using HtmlAgilityPack;
|
||||
using Logging;
|
||||
using Tranga.TrangaTasks;
|
||||
|
||||
namespace Tranga.Connectors;
|
||||
|
||||
@ -161,7 +162,7 @@ public class Manganato : Connector
|
||||
return ret.ToArray();
|
||||
}
|
||||
|
||||
public override void DownloadChapter(Publication publication, Chapter chapter, TrangaTask parentTask)
|
||||
public override void DownloadChapter(Publication publication, Chapter chapter, DownloadChapterTask parentTask)
|
||||
{
|
||||
logger?.WriteLine(this.GetType().ToString(), $"Downloading Chapter-Info {publication.sortName} {publication.internalId} {chapter.volumeNumber}-{chapter.chapterNumber}");
|
||||
string requestUrl = chapter.url;
|
||||
|
Reference in New Issue
Block a user