mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
fix torrent searchbox id
This commit is contained in:
@@ -301,8 +301,12 @@ class SearchRepository extends BaseRepository
|
||||
$idName => $this->getTorrentId($torrent->id),
|
||||
'routing' => $torrent->owner,
|
||||
];
|
||||
$searchBoxId = $torrent->basic_category->mode ?? 0;
|
||||
if ($searchBoxId == 0) {
|
||||
do_log(sprintf('[INVALID_CATEGORY], Torrent: %s', $torrent->id), 'error');
|
||||
}
|
||||
$data = Arr::only($torrent->toArray(), $baseFields);
|
||||
$data['mode'] = $torrent->basic_category->mode;
|
||||
$data['mode'] = $searchBoxId;
|
||||
$body = array_merge($data, [
|
||||
'_doc_type' => $docType,
|
||||
'torrent_id' => $torrent->id,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user