Skip to content

Commit

Permalink
Fix auto path when paths null
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Dec 23, 2020
1 parent e832cfb commit af3c09a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Javinizer/Public/Get-JVItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function Get-JVItem {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 0)]
[String]$Path,
[System.IO.FileInfo]$Path,

[Parameter()]
[Switch]$Recurse,
Expand Down
7 changes: 1 addition & 6 deletions src/Javinizer/Public/Javinizer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ function Javinizer {

[Parameter(ParameterSetName = 'Path', Position = 1)]
[AllowEmptyString()]
[String]$DestinationPath,
[System.IO.DirectoryInfo]$DestinationPath,

[Parameter(ParameterSetName = 'Path')]
[Parameter(ParameterSetName = 'Nfo')]
Expand Down Expand Up @@ -829,11 +829,6 @@ function Javinizer {
}
}

# This will check that the DestinationPath is a valid directory
if (Test-Path -LiteralPath $DestinationPath -PathType Leaf) {
Write-JVLog -Write:$script:JVLogWrite -LogPath $script:JVLogPath -WriteLevel $script:JVLogWriteLevel -Level Error -Message "[$($MyInvocation.MyCommand.Name)] DestinationPath [$DestinationPath] is not a valid directory path"
}

try {
$javMovies = $Settings | Get-JVItem -Path $Path -MinimumFileSize $Settings.'match.minimumfilesize' -RegexEnabled:$Settings.'match.regex' -RegexString $Settings.'match.regex.string' -RegexIdMatch $Settings.'match.regex.idmatch' -RegexPtMatch $Settings.'match.regex.ptmatch' -Recurse:$Recurse -Depth:$Depth -Strict:$Strict
} catch {
Expand Down

0 comments on commit af3c09a

Please sign in to comment.