mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
refactor event
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.12');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-04-24');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-04-25');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -3133,7 +3133,6 @@ function deletetorrent($id, $notify = false) {
|
||||
if ($torrentInfo->has($_id)) {
|
||||
$torrentRep->delPiecesHashCache($torrentInfo->get($_id)->pieces_hash);
|
||||
}
|
||||
do_action("torrent_delete", $_id);
|
||||
do_log("delete torrent: $_id", "error");
|
||||
unlink(getFullDirectory("$torrent_dir/$_id.torrent"));
|
||||
\App\Models\TorrentOperationLog::add([
|
||||
@@ -3145,6 +3144,10 @@ function deletetorrent($id, $notify = false) {
|
||||
}
|
||||
$meiliSearchRep = new \App\Repositories\MeiliSearchRepository();
|
||||
$meiliSearchRep->deleteDocuments($idArr);
|
||||
if (is_int($id)) {
|
||||
do_action("torrent_delete", $id);
|
||||
fire_event("torrent_deleted", $id);
|
||||
}
|
||||
}
|
||||
|
||||
function pager($rpp, $count, $href, $opts = array(), $pagename = "page") {
|
||||
|
||||
Reference in New Issue
Block a user