fix torrent searchbox id

This commit is contained in:
xiaomlove
2022-11-05 01:39:20 +08:00
parent 7d63a0586a
commit aae99b0df1
6 changed files with 36 additions and 7 deletions

View File

@@ -1093,7 +1093,12 @@ class TrackerRepository extends BaseRepository
return;
}
// $hrMode = Setting::get('hr.mode');
$hrMode = HitAndRun::getConfig('mode', $torrent->basic_category->mode);
$searchBoxId = $torrent->basic_category->mode ?? 0;
if ($searchBoxId == 0) {
do_log(sprintf('[INVALID_CATEGORY], Torrent: %s', $torrent->id), 'error');
return;
}
$hrMode = HitAndRun::getConfig('mode', $searchBoxId);
if ($hrMode == HitAndRun::MODE_DISABLED) {
return;
}