mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
add command event:fire + fetch imdb when torrent created
This commit is contained in:
@@ -349,6 +349,7 @@ $insert = [
|
||||
'technical_info' => $_POST['technical_info'] ?? '',
|
||||
'cover' => $cover,
|
||||
'pieces_hash' => sha1($info['pieces']),
|
||||
'cache_stamp' => time(),
|
||||
];
|
||||
if (isset($_POST['hr'][$catmod]) && isset(\App\Models\Torrent::$hrStatus[$_POST['hr'][$catmod]]) && user_can('torrent_hr')) {
|
||||
$insert['hr'] = $_POST['hr'][$catmod];
|
||||
@@ -446,6 +447,9 @@ $searchRep->addTorrent($id);
|
||||
$meiliSearch = new \App\Repositories\MeiliSearchRepository();
|
||||
$meiliSearch->doImportFromDatabase($id);
|
||||
|
||||
//trigger event
|
||||
executeCommand("event:fire --name=torrent_created --id=$id", "string", true, false);
|
||||
|
||||
//===notify people who voted on offer thanks CoLdFuSiOn :)
|
||||
if ($is_offer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user