2
0

Compare commits

..

No commits in common. "5bfd6bc196d1aaaf9aa67b02aa1134cc04a648c4" and "c9602d5f67a316b8822e02256d1b086677f84a91" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -57,10 +57,7 @@ public abstract class Connector
/// <param name="publication">Publication to save series.json for</param>
public void SaveSeriesInfo(Publication publication)
{
//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");
string seriesInfoPath = Path.Join(downloadLocation, publication.folderName, "series.json");
if(!File.Exists(seriesInfoPath))
File.WriteAllText(seriesInfoPath,publication.GetSeriesInfo());
}
@ -113,7 +110,7 @@ public abstract class Connector
//ZIP-it and ship-it
ZipFile.CreateFromDirectory(tempFolder, fullPath);
Directory.Delete(tempFolder, true); //Cleanup
Directory.Delete(tempFolder); //Cleanup
}
protected class DownloadClient

View File

@ -67,10 +67,10 @@ public static class TaskExecutor
private static void DownloadNewChapters(Connector connector, Publication publication, string language, Dictionary<Publication, List<Chapter>> chapterCollection)
{
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
connector.DownloadCover(publication);
connector.SaveSeriesInfo(publication);
foreach(Chapter newChapter in newChapters)
connector.DownloadChapter(publication, newChapter);
connector.DownloadCover(publication);
connector.SaveSeriesInfo(publication);
}
/// <summary>