Moved SaveSeriesInfo to 6 lines of code...

This commit is contained in:
glax 2023-05-19 23:01:34 +02:00
parent ccbe8a95f8
commit 1674d70995

View File

@ -68,7 +68,16 @@ public static class TaskExecutor
{
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
connector.DownloadCover(publication);
connector.SaveSeriesInfo(publication);
//Check if Publication already has a Folder and a series.json
string publicationFolder = Path.Join(connector.downloadLocation, publication.folderName);
if(!Directory.Exists(publicationFolder))
Directory.CreateDirectory(publicationFolder);
string seriesInfoPath = Path.Join(publicationFolder, "series.json");
if(!File.Exists(seriesInfoPath))
File.WriteAllText(seriesInfoPath,publication.GetSeriesInfo());
foreach(Chapter newChapter in newChapters)
connector.DownloadChapter(publication, newChapter);
}