Skip to content

Commit

Permalink
Remove maxpathlength, add maxtitlelength
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Aug 31, 2020
1 parent 3d7cee9 commit f9768b2
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/Javinizer/Public/Set-JVMovie.ps1
Expand Up @@ -20,11 +20,8 @@ function Set-JVMovie {
[Alias('sort.renamefile')]
[Boolean]$RenameFile,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('sort.maxpathlength')]
[Boolean]$MaxPathLength,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('sort.maxtitlelength')]
[Boolean]$MaxTitleLength,
[Int]$MaxTitleLength,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('sort.create.nfo')]
[Boolean]$CreateNfo,
Expand Down Expand Up @@ -94,11 +91,9 @@ function Set-JVMovie {
}

process {
<# Pre-impact code #>
if ($Settings) {
$MoveToFolder = $Settings.'sort.movetofolder'
$RenameFile = $Settings.'sort.renamefile'
$MaxPathLength = $Settings.'sort.maxpathlength'
$MaxTitleLength = $Settings.'sort.maxtitlelength'
$CreateNfo = $Settings.'sort.create.nfo'
$CreateNfoPerFile = $Settings.'sort.create.nfoperfile'
Expand All @@ -121,15 +116,15 @@ function Set-JVMovie {
$NameOrder = $Settings.'sort.metadata.nfo.firstnameorder'
}

$fileName = Convert-JVString -Data $Data -Format $FileFormat -PartNumber $PartNumber
$folderName = Convert-JVString -Data $Data -Format $FolderFormat
$nfoName = Convert-JVString -Data $Data -Format $NfoFormat
$thumbName = Convert-JVString -Data $Data -Format $ThumbnailFormat
$posterName = Convert-JVString -Data $Data -Format $PosterFormat
$trailerName = Convert-JVString -Data $Data -Format $TrailerFormat
$screenshotImgName = Convert-JVString -Data $Data -Format $ScreenshotImgFormat
$screenshotFolderName = Convert-JVString -Data $Data -Format $ScreenshotFolderFormat
$actorFolderName = Convert-JVString -Data $Data -Format $ActorFolderFormat
$fileName = Convert-JVString -Data $Data -Format $FileFormat -PartNumber $PartNumber -MaxTitleLength $MaxTitleLength
$folderName = Convert-JVString -Data $Data -Format $FolderFormat -MaxTitleLength $MaxTitleLength
$nfoName = Convert-JVString -Data $Data -Format $NfoFormat -MaxTitleLength $MaxTitleLength
$thumbName = Convert-JVString -Data $Data -Format $ThumbnailFormat -MaxTitleLength $MaxTitleLength
$posterName = Convert-JVString -Data $Data -Format $PosterFormat -MaxTitleLength $MaxTitleLength
$trailerName = Convert-JVString -Data $Data -Format $TrailerFormat -MaxTitleLength $MaxTitleLength
$screenshotImgName = Convert-JVString -Data $Data -Format $ScreenshotImgFormat -MaxTitleLength $MaxTitleLength
$screenshotFolderName = Convert-JVString -Data $Data -Format $ScreenshotFolderFormat -MaxTitleLength $MaxTitleLength
$actorFolderName = Convert-JVString -Data $Data -Format $ActorFolderFormat -MaxTitleLength $MaxTitleLength

if ($MoveToFolder) {
if ($DestinationPath) {
Expand Down

0 comments on commit f9768b2

Please sign in to comment.