Compare commits
No commits in common. "5bfd6bc196d1aaaf9aa67b02aa1134cc04a648c4" and "c9602d5f67a316b8822e02256d1b086677f84a91" have entirely different histories.
5bfd6bc196
...
c9602d5f67
@ -57,10 +57,7 @@ public abstract class Connector
|
|||||||
/// <param name="publication">Publication to save series.json for</param>
|
/// <param name="publication">Publication to save series.json for</param>
|
||||||
public void SaveSeriesInfo(Publication publication)
|
public void SaveSeriesInfo(Publication publication)
|
||||||
{
|
{
|
||||||
//Check if Publication already has a Folder and a series.json
|
string seriesInfoPath = Path.Join(downloadLocation, publication.folderName, "series.json");
|
||||||
string publicationFolder = Path.Join(downloadLocation, publication.folderName);
|
|
||||||
Directory.CreateDirectory(publicationFolder);
|
|
||||||
string seriesInfoPath = Path.Join(publicationFolder, "series.json");
|
|
||||||
if(!File.Exists(seriesInfoPath))
|
if(!File.Exists(seriesInfoPath))
|
||||||
File.WriteAllText(seriesInfoPath,publication.GetSeriesInfo());
|
File.WriteAllText(seriesInfoPath,publication.GetSeriesInfo());
|
||||||
}
|
}
|
||||||
@ -113,7 +110,7 @@ public abstract class Connector
|
|||||||
|
|
||||||
//ZIP-it and ship-it
|
//ZIP-it and ship-it
|
||||||
ZipFile.CreateFromDirectory(tempFolder, fullPath);
|
ZipFile.CreateFromDirectory(tempFolder, fullPath);
|
||||||
Directory.Delete(tempFolder, true); //Cleanup
|
Directory.Delete(tempFolder); //Cleanup
|
||||||
}
|
}
|
||||||
|
|
||||||
protected class DownloadClient
|
protected class DownloadClient
|
||||||
|
@ -67,10 +67,10 @@ public static class TaskExecutor
|
|||||||
private static void DownloadNewChapters(Connector connector, Publication publication, string language, Dictionary<Publication, List<Chapter>> chapterCollection)
|
private static void DownloadNewChapters(Connector connector, Publication publication, string language, Dictionary<Publication, List<Chapter>> chapterCollection)
|
||||||
{
|
{
|
||||||
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
|
List<Chapter> newChapters = UpdateChapters(connector, publication, language, chapterCollection);
|
||||||
connector.DownloadCover(publication);
|
|
||||||
connector.SaveSeriesInfo(publication);
|
|
||||||
foreach(Chapter newChapter in newChapters)
|
foreach(Chapter newChapter in newChapters)
|
||||||
connector.DownloadChapter(publication, newChapter);
|
connector.DownloadChapter(publication, newChapter);
|
||||||
|
connector.DownloadCover(publication);
|
||||||
|
connector.SaveSeriesInfo(publication);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user