diff --git a/README.md b/README.md index 75064265..fe38dc28 100644 --- a/README.md +++ b/README.md @@ -439,6 +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-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 diff --git a/src/Javinizer/Private/Validate-Settings.ps1 b/src/Javinizer/Private/Validate-Settings.ps1 index 38aeedb9..3d4673c5 100644 --- a/src/Javinizer/Private/Validate-Settings.ps1 +++ b/src/Javinizer/Private/Validate-Settings.ps1 @@ -56,7 +56,8 @@ function Test-Settings { 'minimum-filesize-to-sort', 'regex-id-match', 'regex-pt-match', - 'request-timeout-sec' + 'request-timeout-sec', + 'request-timeout-interval-sec' ) $javlibrarySettings = @( diff --git a/src/Javinizer/Public/Javinizer.ps1 b/src/Javinizer/Public/Javinizer.ps1 index 3babbb6b..325a6b69 100644 --- a/src/Javinizer/Public/Javinizer.ps1 +++ b/src/Javinizer/Public/Javinizer.ps1 @@ -598,6 +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' } else { Write-Warning "[$(Get-TimeStamp)][$($MyInvocation.MyCommand.Name)] Movie [$movie] not matched on JAVLibrary, skipping..." } diff --git a/src/Javinizer/settings.ini b/src/Javinizer/settings.ini index 0e60297f..53685b83 100644 --- a/src/Javinizer/settings.ini +++ b/src/Javinizer/settings.ini @@ -112,6 +112,7 @@ server-api-key= set-owned=False username= session-cookie= +request-timeout-interval-sec=15 request-timeout-sec=90 [Other]