improved search module

This commit is contained in:
huangjx
2022-02-26 21:47:18 +08:00
parent ea07560b5e
commit 0d689ca2dd
6 changed files with 66 additions and 25 deletions

View File

@@ -27,7 +27,6 @@ class torrentSearch
return ['message', $e->getMessage()];
}
$data = $siteInst->search($keyword);
$this->addAction($data);
return $data;
}
@@ -40,14 +39,4 @@ class torrentSearch
}
}
private function addAction(&$data)
{
foreach ($data as $key => &$value) {
if (!$value) {
continue;
}
$value['actions'] = [["name" => 'download', 'path' => '/index.php/apps/ncdownloader/new'], ['name' => 'clipboard']];
}
}
}