Skip to content

Commit

Permalink
Update r18/dmm retry from 5 to 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Aug 12, 2020
1 parent 964199b commit e9c2c57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Javinizer/Public/Get-DmmData.ps1
@@ -1,7 +1,7 @@
function Get-DmmData {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)]
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
[string]$Url
)

Expand Down
17 changes: 11 additions & 6 deletions src/Javinizer/Public/Get-DmmUrl.ps1
Expand Up @@ -28,7 +28,7 @@ function Get-DmmUrl {
Write-JLog -Level Error -Message "Error [GET] on URL [$searchUrl]"
}

$retryCount = 5
$retryCount = 3
$searchResults = ($webrequest.links.href | Where-Object { $_ -like '*digital/videoa/*' })
$numResults = $searchResults.count

Expand Down Expand Up @@ -64,11 +64,16 @@ function Get-DmmUrl {
}
}

$urlObject = [PSCustomObject]@{
Url = $directUrl
Language = 'ja'
if ($null -eq $directUrl) {
Write-JLog -Level Warning -Message "Search [$Id] not matched on DMM"
return
} else {
$urlObject = [PSCustomObject]@{
Url = $directUrl
Language = 'ja'
}

Write-Output $urlObject
}

Write-Output $urlObject
}
}
2 changes: 1 addition & 1 deletion src/Javinizer/Public/Get-R18Url.ps1
Expand Up @@ -39,7 +39,7 @@ function Get-R18Url {
Write-JLog -Level Error -Message "Error [GET] on URL [$searchUrl]: $PSItem"
}

$retryCount = 5
$retryCount = 3
$searchResults = (($webRequest.Links | Where-Object { $_.href -like "*/videos/vod/*/detail/-/id=*" }).href)
$numResults = $searchResults.count

Expand Down

0 comments on commit e9c2c57

Please sign in to comment.