diff --git a/Tranga/Connector.cs b/Tranga/Connector.cs
index 51be4dd..c56b0d6 100644
--- a/Tranga/Connector.cs
+++ b/Tranga/Connector.cs
@@ -57,7 +57,10 @@ public abstract class Connector
/// Publication to save series.json for
public void SaveSeriesInfo(Publication publication)
{
- string seriesInfoPath = Path.Join(downloadLocation, publication.folderName, "series.json");
+ //Check if Publication already has a Folder and a series.json
+ string publicationFolder = Path.Join(downloadLocation, publication.folderName);
+ Directory.CreateDirectory(publicationFolder);
+ string seriesInfoPath = Path.Join(publicationFolder, "series.json");
if(!File.Exists(seriesInfoPath))
File.WriteAllText(seriesInfoPath,publication.GetSeriesInfo());
}
diff --git a/Tranga/TaskExecutor.cs b/Tranga/TaskExecutor.cs
index c4b0ff2..5c424df 100644
--- a/Tranga/TaskExecutor.cs
+++ b/Tranga/TaskExecutor.cs
@@ -67,10 +67,10 @@ public static class TaskExecutor
private static void DownloadNewChapters(Connector connector, Publication publication, string language, Dictionary> chapterCollection)
{
List newChapters = UpdateChapters(connector, publication, language, chapterCollection);
- foreach(Chapter newChapter in newChapters)
- connector.DownloadChapter(publication, newChapter);
connector.DownloadCover(publication);
connector.SaveSeriesInfo(publication);
+ foreach(Chapter newChapter in newChapters)
+ connector.DownloadChapter(publication, newChapter);
}
///