mirror of
https://github.com/C9Glax/tranga.git
synced 2025-01-12 11:27:32 +01:00
Moved SaveSeriesInfo to 6 lines of code...
This commit is contained in:
parent
ccbe8a95f8
commit
1674d70995
@ -68,7 +68,16 @@ public static class TaskExecutor
|
|||||||
{
|
{
|
||||||
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
|
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
|
||||||
connector.DownloadCover(publication);
|
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)
|
foreach(Chapter newChapter in newChapters)
|
||||||
connector.DownloadChapter(publication, newChapter);
|
connector.DownloadChapter(publication, newChapter);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user