diff --git a/src/Samples/Downloader.Sample/Downloader.Sample.csproj b/src/Samples/Downloader.Sample/Downloader.Sample.csproj index 2c40154..efe0837 100644 --- a/src/Samples/Downloader.Sample/Downloader.Sample.csproj +++ b/src/Samples/Downloader.Sample/Downloader.Sample.csproj @@ -21,7 +21,7 @@ - + Always diff --git a/src/Samples/Downloader.Sample/Program.Config.cs b/src/Samples/Downloader.Sample/Program.Config.cs index b378bab..bc2b6ad 100644 --- a/src/Samples/Downloader.Sample/Program.Config.cs +++ b/src/Samples/Downloader.Sample/Program.Config.cs @@ -13,7 +13,7 @@ private static DownloadConfiguration GetDownloadConfiguration() return new DownloadConfiguration { BufferBlockSize = 10240, // usually, hosts support max to 8000 bytes, default values is 8000 ChunkCount = 8, // file parts to download, default value is 1 - MaximumBytesPerSecond = 0, // download speed limited to 10MB/s, default values is zero or unlimited + MaximumBytesPerSecond = 1024 * 1024 * 10, // download speed limited to 10MB/s, default values is zero or unlimited MaxTryAgainOnFailover = 5, // the maximum number of times to fail MaximumMemoryBufferBytes = 1024 * 1024 * 200, // release memory buffer after each 200MB ParallelDownload = true, // download parts of file as parallel or not. Default value is false @@ -24,7 +24,7 @@ private static DownloadConfiguration GetDownloadConfiguration() RangeHigh = 0, // ceiling offset of download range of a large file ClearPackageOnCompletionWithFailure = true, // Clear package and downloaded data when download completed with failure, default value is false MinimumSizeOfChunking = 1024, // minimum size of chunking to download a file in multiple parts, default value is 512 - ReserveStorageSpaceBeforeStartingDownload = true, // Before starting the download, reserve the storage space of the file as file size, default value is false + ReserveStorageSpaceBeforeStartingDownload = false, // Before starting the download, reserve the storage space of the file as file size, default value is false RequestConfiguration = { // config and customize request headers diff --git a/src/Samples/Downloader.Sample/Program.cs b/src/Samples/Downloader.Sample/Program.cs index 55de224..d4575e7 100644 --- a/src/Samples/Downloader.Sample/Program.cs +++ b/src/Samples/Downloader.Sample/Program.cs @@ -15,7 +15,7 @@ namespace Downloader.Sample; public partial class Program { - private const string DownloadListFile = "DownloadList.json"; + private const string DownloadListFile = "download.json"; private static List DownloadList; private static ProgressBar ConsoleProgress; private static ConcurrentDictionary ChildConsoleProgresses; diff --git a/src/Samples/Downloader.Sample/DownloadList.json b/src/Samples/Downloader.Sample/download.json similarity index 100% rename from src/Samples/Downloader.Sample/DownloadList.json rename to src/Samples/Downloader.Sample/download.json