Simplification
This commit is contained in:
parent
9d583b284a
commit
2c8e647a04
@ -93,8 +93,7 @@ public static class TaskExecutor
|
||||
private static List<Chapter> UpdateChapters(Connector connector, Publication publication, string language, Dictionary<Publication, List<Chapter>> chapterCollection)
|
||||
{
|
||||
List<Chapter> newChaptersList = new();
|
||||
if (!chapterCollection.ContainsKey(publication))
|
||||
return newChaptersList;
|
||||
chapterCollection.TryAdd(publication, newChaptersList); //To ensure publication is actually in collection
|
||||
|
||||
Chapter[] newChapters = connector.GetChapters(publication, language);
|
||||
newChaptersList = newChapters.Where(nChapter => !connector.ChapterIsDownloaded(publication, nChapter)).ToList();
|
||||
|
Loading…
Reference in New Issue
Block a user