public bool download(getFileInfo file) { if (!checkFileList(file.getFullTitle())) { string filePath = fullPath + file.FileName; getFile(file.getFileUrl(), filePath); writeToIndex(file.getFullTitle()); return true; } else { Console.WriteLine("Skipping download already have file."); return false; } }
public multiDownload(config settings, ref processFile downloadAndSave, int limit) { int counter = 0; bool runLoop = true; while (runLoop) { getFileInfo currentFile = new getFileInfo(settings, counter); if (currentFile.getFileUrl() != "" && counter < limit) { Console.WriteLine("Downloading: "+currentFile.getFullTitle()); downloadAndSave.download(currentFile); } else { runLoop = false; } counter++; } }