Skip to content

Commit

Permalink
Fix file declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Sep 1, 2020
1 parent a48b4ba commit 03e321f
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/Javinizer/Public/Get-JVAggregatedData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function Get-JVAggregatedData {

[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Setting')]
[Alias('sort.metadata.thumbcsv.path')]
[Boolean]$ThumbCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvThumbs.csv'),
[System.IO.FileInfo]$ThumbCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvThumbs.csv'),

[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Setting')]
[Alias('sort.metadata.thumbcsv.convertalias')]
Expand All @@ -93,7 +93,7 @@ function Get-JVAggregatedData {

[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Setting')]
[Alias('sort.metadata.genrecsv.path')]
[Boolean]$GenreCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvGenres.csv'),
[System.IO.FileInfo]$GenreCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvGenres.csv'),

[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Setting')]
[Alias('sort.metadata.genre.ignore')]
Expand Down Expand Up @@ -136,16 +136,12 @@ function Get-JVAggregatedData {
$IgnoreGenre = $Settings.'sort.metadata.genre.ignore'
$Translate = $Settings.'sort.metadata.nfo.translate'
$TranslateLanguage = $Settings.'sort.metadata.nfo.translate.language'
$GenreCsvPath = $Settings.'sort.metadata.genrecsv.path'
$ThumbCsvPath = $Settings.'sort.metadata.thumbcsv.path'
}

if ($ThumbCsvPath -eq '') {
$ThumbCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvThumbs.csv')
}

if ($GenreCsvPath -eq '') {
$GenreCsvPath = (Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvGenres.csv')
if ($Settings.'sort.metadata.genrecsv.path' -ne '') {
$GenreCsvPath = $Settings.'sort.metadata.genrecsv.path'
}
if ($Settings.'sort.metadata.thumbcsv.path' -ne '') {
$ThumbCsvPath = $Settings.'sort.metadata.genrecsv.path'
}
}

$aggregatedDataObject = [PSCustomObject]@{
Expand Down

0 comments on commit 03e321f

Please sign in to comment.