Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit b862e76

Browse files
committed
Delay after too many failed searches on saucenao
1 parent 4f949c5 commit b862e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -944,9 +944,9 @@ function () use ($entry) {
944944

945945
$results = $this->reverseSearchSaucenao($this->PATH_IMAGES . '/' . $entry);
946946

947-
if (isset($results['error']) && $results['error'] === 'ShortLimitReached') {
947+
if (isset($results['error']) && ($results['error'] === 'ShortLimitReached' || $results['error'] === 'FailedLimitReached')) {
948948
$results = $this->applyCooldown(
949-
30,
949+
$results['error'] === 'ShortLimitReached' ? 30 : 60,
950950
$results,
951951
function () use ($entry) {
952952
return $this->reverseSearchSaucenao($this->PATH_IMAGES . '/' . $entry);

0 commit comments

Comments
 (0)