Skip to content

Commit

Permalink
skip redownload failed miners
Browse files Browse the repository at this point in the history
  • Loading branch information
Quake4 committed Apr 15, 2022
1 parent c9fcbff commit 05189d9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions MindMiner.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 05189d9

Please sign in to comment.