mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
+15
-3
@@ -350,9 +350,17 @@ HTML;
|
|||||||
|
|
||||||
public function isIyuu(array $bodyArr): bool
|
public function isIyuu(array $bodyArr): bool
|
||||||
{
|
{
|
||||||
return false;
|
$version = (string)($bodyArr['version'] ?? '');
|
||||||
//Not support, due to change frequently
|
switch ($version) {
|
||||||
// return isset($bodyArr['ret']) && $bodyArr['ret'] == 200;
|
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
|
public function listRatings(array $ptGenData, string $imdbLink, string $desc = ''): array
|
||||||
@@ -574,6 +582,10 @@ HTML;
|
|||||||
do_log("$log, site: $site can not be updated: " . $exception->getMessage(), 'error');
|
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);
|
$siteIdAndRating = $this->listRatings($ptGenInfo, $torrent->url, $extra->descr);
|
||||||
foreach ($siteIdAndRating as $key => $value) {
|
foreach ($siteIdAndRating as $key => $value) {
|
||||||
if (!isset($ptGenInfo[$key]['data']) || !is_array($ptGenInfo[$key]['data'])) {
|
if (!isset($ptGenInfo[$key]['data']) || !is_array($ptGenInfo[$key]['data'])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user