diff --git a/CHANGELOG.md b/CHANGELOG.md index d6ec0c2..87041ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Atlassian Downloader - Changelog ## 2.x +* `2.0.0.2` - - minor update: + * Added `maxRetries (default: 5)` and `delayBetweenRetries (default: 2500, milliseconds)` args, to redownload file if connection will be reset. + * Updated dependencies. * `2.0.0.1` - - minor update: * Fix default output dir, enable nullables, fix compiler warnings #43 * Remove redundant parameters from publish profiles #42 diff --git a/src/Core/DownloaderService.cs b/src/Core/DownloaderService.cs index 81b9bf5..413c5ce 100644 --- a/src/Core/DownloaderService.cs +++ b/src/Core/DownloaderService.cs @@ -213,31 +213,43 @@ private async Task DownloadFilesFromFeed(string feedUrl, IDictionaryOverride target version to download some product. Advice: Use it with "customFeed". /// Skip compare of file sizes if a local file already exists. Existing file will be skipped to check and redownload. /// Set custom user agent via this feature flag. + /// Set custom count of download retries. + /// Set custom delay between retries (in milliseconds). static async Task Main( string? outputDir = default, Uri[]? customFeed = null, @@ -31,6 +33,8 @@ static async Task Main( bool about = false, string? productVersion = null, bool skipFileCheck = false, + int maxRetries = 5, + int delayBetweenRetries = 2500, string userAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:101.0) Gecko/20100101 Firefox/101.0") => await Host .CreateDefaultBuilder() @@ -60,7 +64,9 @@ static async Task Main( about, productVersion, skipFileCheck, - userAgent)) + userAgent, + maxRetries, + delayBetweenRetries)) .AddHttpClient()) .RunConsoleAsync() .ConfigureAwait(false); diff --git a/src/atlassian-downloader.csproj b/src/atlassian-downloader.csproj index 493a125..1c2b4d9 100644 --- a/src/atlassian-downloader.csproj +++ b/src/atlassian-downloader.csproj @@ -12,6 +12,7 @@ enable Exe + true net8.0 false favicon.ico @@ -26,25 +27,25 @@ git https://github.com/EpicMorg/atlassian-downloader atlassian, donwloader, epicmorg - 2.0.0.0 - 2.0.0.0 - 2.0.0.0 - EpicMorg 2023 + 2.0.0.2 + 2.0.0.2 + 2.0.0.2 + EpicMorg 2024 Atlassian Downloader EpicMorg README.md EpicMorg.Atlassian.Downloader - - - - - - - - - + + + + + + + + + True