Skip to content

Commit

Permalink
Change set-owned interval setting name
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Jul 22, 2020
1 parent d41e254 commit 52ab693
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -439,7 +439,7 @@ server-api-key | String value | The API key for your Emby/Jellyfin server instan
set-owned | True/False | Sets sorted movies as "Owned" on JAVLibrary, requires a JAVLibrary account
username | String value | Your JAVLibrary username
session-cookie | String value | After logging in, view the cookies under the `www.javlibrary.com/cookies/session` directory and copy the cookie content
request-timeout-interval-sec | Interger value (0+) | Sets the timeout value in seconds on how long Javinizer will wait between setting a movie as owned on JAVLibrary. This is required due to JAVLibrary erroring when setting movies as owned too quickly
request-interval-sec | Interger value (0+) | Sets the timeout value in seconds on how long Javinizer will wait between setting a movie as owned on JAVLibrary. This is required due to JAVLibrary erroring when setting movies as owned too quickly
request-timeout-sec | Integer value (0+) | Sets the timeout value in seconds on how long Javinizer will continue polling Javinizer to set the owned status (polls every 3 seconds)
log-path | String value (Path) | Sets the path to your log file; If left blank, it will default to a location within your module folder
check-updates | True/False | Checks for updates to the Javinizer module upon your first console session runtime
Expand Down
6 changes: 2 additions & 4 deletions src/Javinizer/Private/Validate-Settings.ps1
Expand Up @@ -30,7 +30,6 @@ function Test-Settings {
'first-last-name-order',
'convert-alias-to-originalname'
'normalize-genres',
'set-owned',
'check-updates',
'verbose-shell-output',
'debug-shell-output'
Expand All @@ -57,14 +56,13 @@ function Test-Settings {
'regex-id-match',
'regex-pt-match',
'request-timeout-sec',
'request-timeout-interval-sec'
'request-interval-sec'
)

$javlibrarySettings = @(
'set-owned',
'username',
'session-cookie',
'requeste-timeout-sec'
'request-timeout-sec'
)

$validTags = @(
Expand Down
4 changes: 2 additions & 2 deletions src/Javinizer/Public/Javinizer.ps1
Expand Up @@ -598,7 +598,7 @@ function Javinizer {
$ajaxId = $javlibObject.AjaxId
$url = $javlibObject.Url
Set-JavlibraryOwned -AjaxId $ajaxId -JavlibraryUrl $url -Settings $settings
Start-Sleep -Seconds $Settings.JavLibrary.'request-timeout-interval-sec'
Start-Sleep -Seconds $Settings.JavLibrary.'request-interval-sec'
} else {
Write-Warning "[$(Get-TimeStamp)][$($MyInvocation.MyCommand.Name)] Movie [$movie] not matched on JAVLibrary, skipping..."
}
Expand Down Expand Up @@ -687,7 +687,7 @@ function Javinizer {
return
}

if ($Javlibrary -or $Settings.JavLibrary.'set-owned' -eq 'True') {
if ($Javlibrary) {
if ($null -eq $session) {
New-CloudflareSession -ScriptRoot $ScriptRoot
}
Expand Down
3 changes: 1 addition & 2 deletions src/Javinizer/settings.ini
Expand Up @@ -109,10 +109,9 @@ server-url=192.168.0.1:8096
server-api-key=

[JavLibrary]
set-owned=False
username=
session-cookie=
request-timeout-interval-sec=15
request-interval-sec=15
request-timeout-sec=90

[Other]
Expand Down

0 comments on commit 52ab693

Please sign in to comment.