Skip to content

Commit

Permalink
Add nested output folder (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Oct 18, 2020
1 parent c2f1e84 commit 3bd7d72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/Javinizer/Private/Test-JVSettings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function Test-JVSettings {
$arraySettings = @(
'match.excludedfilestring',
'match.includedfileextension',
"sort.format.outputfolder",
'sort.format.posterimg',
'sort.metadata.genre.ignore',
'sort.metadata.nfo.format.tag',
Expand Down
8 changes: 6 additions & 2 deletions src/Javinizer/Public/Set-JVMovie.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Set-JVMovie {

[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('sort.format.outputfolder')]
[String]$OutputFolderFormat,
[Array]$OutputFolderFormat,

[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('sort.format.posterimg')]
Expand Down Expand Up @@ -179,7 +179,11 @@ function Set-JVMovie {
$fileName = (Get-Item -LiteralPath $Path).BaseName
}
if ($outputFolderFormat -ne '') {
$outputFolderName = Convert-JVstring -Data $Data -Format $OutputFolderFormat -MaxTitleLength $MaxTitleLength -Delimiter $DelimiterFormat -ActressLanguageJa:$ActressLanguageJa -FirstNameOrder:$FirstNameOrder -GroupActress:$GroupActress
$outputFolders = @()
foreach ($format in $outputFolderFormat) {
$outputFolders += Convert-JVstring -Data $Data -Format $format -MaxTitleLength $MaxTitleLength -Delimiter $DelimiterFormat -ActressLanguageJa:$ActressLanguageJa -FirstNameOrder:$FirstNameOrder -GroupActress:$GroupActress
}
$outputFolderName = $outputFolders -join '/'
}
$folderName = Convert-JVString -Data $Data -Format $FolderFormat -MaxTitleLength $MaxTitleLength -Delimiter $DelimiterFormat -ActressLanguageJa:$ActressLanguageJa -FirstNameOrder:$FirstNameOrder -GroupActress:$GroupActress
$thumbName = Convert-JVString -Data $Data -Format $ThumbnailFormat -MaxTitleLength $MaxTitleLength -Delimiter $DelimiterFormat -ActressLanguageJa:$ActressLanguageJa -FirstNameOrder:$FirstNameOrder -GroupActress:$GroupActress
Expand Down
2 changes: 1 addition & 1 deletion src/Javinizer/jvSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"sort.format.delimiter": ", ",
"sort.format.file": "<ID>",
"sort.format.folder": "<ID> [<STUDIO>] - <TITLE> (<YEAR>)",
"sort.format.outputfolder": "",
"sort.format.outputfolder": [],
"sort.format.posterimg": ["folder"],
"sort.format.thumbimg": "fanart",
"sort.format.trailervid": "<ID>-trailer",
Expand Down

0 comments on commit 3bd7d72

Please sign in to comment.