Skip to content

Commit

Permalink
Update TorrentScript.ps1
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
Rouzax authored Feb 25, 2024
1 parent 1296c6d commit 39d35ae
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions TorrentScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ param(
[switch]$NoCleanUp
)

# Get function definition files.
$Functions = @( Get-ChildItem -Path $PSScriptRoot\functions\*.ps1 -ErrorAction SilentlyContinue )
# Dot source the files
ForEach ($import in @($Functions)) {
Try {
# dotsourcing a function script
.$import.FullName
} Catch {
Write-Error -Message "Failed to import function $($import.FullName): $_"
}
}

Write-Host 'Loading Powershell Modules, this might take a while' -ForegroundColor DarkYellow
# Load required modules
$modules = @("WriteAscii", "Send-MailKitMessage")
Expand Down Expand Up @@ -124,18 +136,6 @@ $omdbAPI = $Config.OpenSub.omdbAPI
$WantedLanguages = $Config.WantedLanguages
$SubtitleNamesToRemove = $Config.SubtitleNamesToRemove

# Get function definition files.
$Functions = @( Get-ChildItem -Path $PSScriptRoot\functions\*.ps1 -ErrorAction SilentlyContinue )
# Dot source the files
ForEach ($import in @($Functions)) {
Try {
# dotsourcing a function script
.$import.FullName
} Catch {
Write-Error -Message "Failed to import function $($import.FullName): $_"
}
}

# Test additional programs
$Tools = @($WinRarPath, $MKVMergePath, $MKVExtractPath, $SubtitleEditPath, $SubliminalPath, $MailSendPath)
foreach ($Tool in $Tools) {
Expand Down

0 comments on commit 39d35ae

Please sign in to comment.