Skip to content

Commit 04f78f3

Browse files
现在更新bgm缓存前会检查 !isset($collData['error'])
修复一个注释错字
1 parent b972d7b commit 04f78f3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inc/classes/bangumi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function fetchCollections()
8080
if ($total > count($dataList)) {
8181
$pageLimit = 50;
8282
$pages = (int)ceil($total / $pageLimit);
83-
// 避免有人追番太多,导致太多调用卡死,设定调用总次数上线(10次)
83+
// 避免有人追番太多,导致太多调用卡死,设定调用总次数上限(10次)
8484
$pages = min($pages, 10);
8585
for ($i = 1; $i < $pages; $i++) {
8686
$offset = $pageLimit * $i;
@@ -100,7 +100,7 @@ private function fetchCollections()
100100
$collData['offset'] = 0;
101101
$collData['total'] = $total;
102102

103-
if ($bangumi_cache && isset($collData['data']) && is_array($collData['data'])) {
103+
if ($bangumi_cache && !isset($collData['error']) && isset($collData['data']) && is_array($collData['data'])) {
104104
auto_update_cache($cache_key, json_encode($collData));
105105
}
106106
}

0 commit comments

Comments
 (0)