Skip to content

Commit

Permalink
Update location settings names
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Sep 1, 2020
1 parent 2b77def commit d9acfcb
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions src/Javinizer/Public/Get-JVAggregatedData.ps1
Expand Up @@ -83,7 +83,7 @@ function Get-JVAggregatedData {
[Boolean]$ThumbCsv,

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

[Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Setting')]
Expand All @@ -95,7 +95,7 @@ function Get-JVAggregatedData {
[Boolean]$ReplaceGenre,

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

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

Expand Down
24 changes: 12 additions & 12 deletions src/Javinizer/Public/Javinizer.ps1
Expand Up @@ -145,13 +145,13 @@ function Javinizer {
}

if ($Settings.'admin.log' -eq '1') {
if ($Settings.'admin.log.path' -eq '') {
if ($Settings.'location.log' -eq '') {
$logPath = Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvLog.log'
} else {
if (!(Test-Path -LiteralPath $Settings.'admin.log.path' -PathType Leaf)) {
New-Item -Path $Settings.'admin.log.path' | Out-Null
if (!(Test-Path -LiteralPath $Settings.'location.log' -PathType Leaf)) {
New-Item -Path $Settings.'location.log' | Out-Null
}
$logPath = $Settings.'admin.log.path'
$logPath = $Settings.'location.log'
}
Add-LoggingTarget -Name File -Configuration @{
Path = $logPath
Expand All @@ -162,22 +162,22 @@ function Javinizer {
}
}

if ($Settings.'sort.metadata.thumbcsv.path' -eq '') {
if ($Settings.'location.thumbcsv' -eq '') {
$thumbCsvPath = Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvThumbs.csv'
} else {
if (!(Test-Path -LiteralPath $Settings.'sort.metadata.thumbcsv.path' -PathType Leaf)) {
New-Item -Path $Settings.'sort.metadata.thumbcsv.path' | Out-Null
if (!(Test-Path -LiteralPath $Settings.'location.thumbcsv' -PathType Leaf)) {
New-Item -Path $Settings.'location.thumbcsv' | Out-Null
}
$thumbCsvPath = $Settings.'sort.metadata.thumbcsv.path'
$thumbCsvPath = $Settings.'location.thumbcsv'
}

if ($Settings.'sort.metadata.genrecsv.path' -eq '') {
if ($Settings.'location.genrecsv' -eq '') {
$genreCsvPath = Join-Path -Path ((Get-Item $PSScriptRoot).Parent) -ChildPath 'jvGenres.csv'
} else {
if (!(Test-Path -LiteralPath $Settings.'sort.metadata.genrecsv.path' -PathType Leaf)) {
New-Item -Path $Settings.'sort.metadata.genrecsv.path' | Out-Null
if (!(Test-Path -LiteralPath $Settings.'location.genrecsv' -PathType Leaf)) {
New-Item -Path $Settings.'location.genrecsv' | Out-Null
}
$genreCsvPath = $Settings.'sort.metadata.genrecsv.path'
$genreCsvPath = $Settings.'location.genrecsv'
}

if ($PSBoundParameters.ContainsKey('MoveToFolder')) {
Expand Down
10 changes: 5 additions & 5 deletions src/Javinizer/jvSettings.json
@@ -1,6 +1,9 @@
{
"location.input": "C:\\Downloads\\Unsorted",
"location.output": "C:\\Downloads\\Sorted",
"location.thumbcsv": "",
"location.genrecsv": "",
"location.log": "",
"scraper.movie.dmm": 1,
"scraper.movie.jav321": 0,
"scraper.movie.javbus": 0,
Expand Down Expand Up @@ -57,10 +60,8 @@
"sort.metadata.nfo.firstnameorder": 0,
"sort.metadata.nfo.actresslanguageja": 0,
"sort.metadata.thumbcsv": 1,
"sort.metadata.thumbcsv.path": "",
"sort.metadata.thumbcsv.convertalias": 1,
"sort.metadata.genrecsv": 1,
"sort.metadata.genrecsv.path": "",
"sort.metadata.genre.ignore": [
"Featured Actress",
"Hi-Def"
Expand Down Expand Up @@ -120,15 +121,15 @@
"r18",
"r18zh"
],
"sort.metadata.priority.screenshotUrl": [
"sort.metadata.priority.screenshoturl": [
"r18",
"dmm"
],
"sort.metadata.priority.title": [
"r18",
"javlibrary"
],
"sort.metadata.priority.trailerUrl": [
"sort.metadata.priority.trailerurl": [
"r18"
],
"emby.url": "http:\/\/192.168.0.1:8096",
Expand All @@ -139,6 +140,5 @@
"javlibrary.request.interval": 15,
"javlibrary.request.timeout": 90,
"admin.log": 1,
"admin.log.path": "",
"admin.log.level": "info"
}

0 comments on commit d9acfcb

Please sign in to comment.