Merge remote-tracking branch 'origin/php8' into php8

This commit is contained in:
xiaomlove
2025-12-29 00:03:48 +07:00
43 changed files with 1766 additions and 840 deletions
+15 -3
View File
@@ -351,9 +351,17 @@ HTML;
public function isIyuu(array $bodyArr): bool
{
return false;
//Not support, due to change frequently
// return isset($bodyArr['ret']) && $bodyArr['ret'] == 200;
$version = (string)($bodyArr['version'] ?? '');
switch ($version) {
case '2.0.0':
return isset($bodyArr['ret'])
&& intval($bodyArr['ret']) === 200
&& isset($bodyArr['data']['format'])
&& is_string($bodyArr['data']['format'])
&& $bodyArr['data']['format'] !== '';
default:
return false;
}
}
public function listRatings(array $ptGenData, string $imdbLink, string $desc = ''): array
@@ -575,6 +583,10 @@ HTML;
do_log("$log, site: $site can not be updated: " . $exception->getMessage(), 'error');
}
}
if (empty($ptGenInfo)) {
do_log("$log, no pt gen info updated");
return false;
}
$siteIdAndRating = $this->listRatings($ptGenInfo, $torrent->url, $extra->descr);
foreach ($siteIdAndRating as $key => $value) {
if (!isset($ptGenInfo[$key]['data']) || !is_array($ptGenInfo[$key]['data'])) {