diff --git a/Animelibk.ps1 b/Animelibk.ps1 index 1432a76..5c5286c 100644 --- a/Animelibk.ps1 +++ b/Animelibk.ps1 @@ -12,6 +12,7 @@ #$Include = ".rmvb", ".mp4", ".mkv", ".avi" $SubExt = if ($Sub) { ".ssa", ".ass", ".srt" } +$Include = $Include + $SubExt Import-Module -Name ($PSScriptRoot + "\PathChar.psd1") Import-Module -Name ($PSScriptRoot + "\NameRegex.psd1") @@ -165,14 +166,14 @@ if ($Single) { $List = @(Get-Item -Path $(Edit-PathChar $Path)) $BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.NewName.Episode -notin $WorkData.Episode} #$BuildList | ? {$_.NewName.Episode -notin $WorkData.Episode} | Format-List -<# } elseif ($Sub) { - $List = @(Get-Item -Path $(Edit-PathChar $Path)) - $BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.File.Extension -in @(".ass", ".ssa")} #> +# } elseif ($Sub) { +# $List = @(Get-Item -Path $(Edit-PathChar $Path)) +# $BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj | ? {$_.File.Extension -in @(".ass", ".ssa")} } elseif ($testrun) { $List = @(Edit-PathChar $Path | Get-Item | ? { $_.GetType().Name -eq "FileInfo" }) + @(Edit-PathChar $Path | Get-Item | ? { $_.GetType().Name -eq "DirectoryInfo" } | % { $_.GetFiles() }) $BuildList = $List | select $FileObj, $StructPathObj, $NewNameObj - if ($Include -ne "") { $BuildList = $BuildList | ? {$_.File.Extension -in $Include, $SubExt} } + if ($Include -ne "") { $BuildList = $BuildList | ? {$_.File.Extension -in $Include} } if (-not($Force)) { $BuildList = $BuildList | ? {$_.NewName.Episode -notin $WorkData.Episode} } } else { exit 0;