From 64510c5fc260a92268d305cf6f680495e8397422 Mon Sep 17 00:00:00 2001 From: STAM Date: Sun, 4 Aug 2024 21:08:45 +0300 Subject: [PATCH] pre-2.0.0.2 --- src/Core/DownloaderService.cs | 46 +++++++++++++++++++++------------ src/Models/DownloaderOptions.cs | 5 +++- src/Program.cs | 8 +++++- src/atlassian-downloader.csproj | 27 +++++++++---------- 4 files changed, 54 insertions(+), 32 deletions(-) diff --git a/src/Core/DownloaderService.cs b/src/Core/DownloaderService.cs index 81b9bf5..9a1cbbd 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