fix torrentrss descr

This commit is contained in:
xiaomlove
2025-01-20 12:02:59 +08:00
parent a74a2c3c2a
commit a197cade6d
2 changed files with 9 additions and 9 deletions
+6 -5
View File
@@ -74,13 +74,14 @@ class Torrent
if (is_null($ptGen)) {
$ptGen = new PTGen();
}
$ptGenInfo = $torrentInfo['pt_gen'];
if (!is_array($torrentInfo['pt_gen']) && is_string($torrentInfo['pt_gen'])) {
$ptGenInfo = json_decode($ptGenInfo, true);
}
// $ptGenInfo = $torrentInfo['pt_gen'];
// if (!is_array($torrentInfo['pt_gen']) && is_string($torrentInfo['pt_gen'])) {
// $ptGenInfo = json_decode($ptGenInfo, true);
// }
$log = "torrent: " . $torrentInfo['id'];
$siteIdAndRating = $ptGen->listRatings($ptGenInfo ?? [], $torrentInfo['url']);
// $siteIdAndRating = $ptGen->listRatings($ptGenInfo ?? [], $torrentInfo['url']);
$siteIdAndRating = $ptGen->listRatings([], $torrentInfo['url']);
$log .= "siteIdAndRating: " . json_encode($siteIdAndRating);
do_log($log);
return $ptGen->buildRatingSpan($siteIdAndRating);