From 05189d91873dcbccd3a451bfc56af9e6b487a37c Mon Sep 17 00:00:00 2001 From: Quake4 Date: Fri, 15 Apr 2022 15:34:17 +0300 Subject: [PATCH] skip redownload failed miners --- MindMiner.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/MindMiner.ps1 b/MindMiner.ps1 index f59fba0f..b281725b 100644 --- a/MindMiner.ps1 +++ b/MindMiner.ps1 @@ -23,7 +23,7 @@ $global:API = [hashtable]::Synchronized(@{}) # ctrl+c hook [Console]::TreatControlCAsInput = $true -[Console]::Title = "MindMiner $([Config]::Version.Replace("v", [string]::Empty)) - $([datetime]::Now.ToString())" +[Console]::Title = "MindMiner $([Config]::Version -replace "v") - $([datetime]::Now.ToString())" $BinLocation = [IO.Path]::Combine($(Get-Location), [Config]::BinLocation) New-Item $BinLocation -ItemType Directory -Force | Out-Null @@ -419,11 +419,9 @@ while ($true) $DownloadJob | Remove-Job -Force | Out-Null $DownloadJob.Dispose() $DownloadJob = $null - $PathUri | Foreach-Object { - $q = $DownloadExclude.Add($_.URI); - } + $PathUri | Foreach-Object { $DownloadExclude.Add($_.Path) | Out-Null } } - $DownloadMiners = $AllMiners | Where-Object { !$_.Exists([Config]::BinLocation) -and $DownloadExclude -notcontains $_.URI } | Select-Object Name, Path, URI, Pass -Unique + $DownloadMiners = $AllMiners | Where-Object { !$_.Exists([Config]::BinLocation) -and $DownloadExclude -notcontains $_.Path } | Select-Object Name, Path, URI, Pass -Unique if ($DownloadMiners -and ($DownloadMiners.Length -gt 0 -or $DownloadMiners -is [PSCustomObject])) { Write-Host "Download miner(s): $(($DownloadMiners | Select-Object Name -Unique | ForEach-Object { $_.Name }) -Join `", `") ... " -ForegroundColor Green if (!$DownloadJob) {