Skip to content

Commit

Permalink
Change javlibrary set owned timeout as user-defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Jul 11, 2020
1 parent a950e08 commit d488f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Javinizer/Private/Set-JavlibraryOwned.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function Set-JavlibraryOwned {

try {
$index = 0
$timeout = New-TimeSpan -Seconds 60
$timeout = New-TimeSpan -Seconds $Settings.JavLibrary.'request-timeout-sec'
$stopwatch = [System.Diagnostics.Stopwatch]::StartNew()
while ($check.content -notmatch '"ERROR":1' -and $stopwatch.elapsed -lt $timeout) {
if ($check.Content -match '"ERROR":-3') {
Expand Down
1 change: 1 addition & 0 deletions src/Javinizer/settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ server-api-key=
set-owned=False
username=
session-cookie=
request-timeout-sec=90

[Other]
# Log path will default to the javinizer.log file inside your module directory
Expand Down

0 comments on commit d488f50

Please sign in to comment.