admin add torrents

This commit is contained in:
xiaomlove
2022-07-03 14:00:07 +08:00
parent 9cf1cc7277
commit bd11527f4b
26 changed files with 393 additions and 31 deletions

View File

@@ -521,11 +521,11 @@ class TorrentRepository extends BaseRepository
NexusDB::transaction(function () use ($torrent, $torrentOperationLog, $torrentUpdate, $notifyUser) {
$log = "torrent: " . $torrent->id;
if (!empty($torrentUpdate)) {
$log .= "[UPDATE_TORRENT]: " . nexus_json_encode($torrentUpdate);
$log .= ", [UPDATE_TORRENT]: " . nexus_json_encode($torrentUpdate);
$torrent->update($torrentUpdate);
}
if (!empty($torrentOperationLog)) {
$log .= "[ADD_TORRENT_OPERATION_LOG]: " . nexus_json_encode($torrentOperationLog);
$log .= ", [ADD_TORRENT_OPERATION_LOG]: " . nexus_json_encode($torrentOperationLog);
TorrentOperationLog::add($torrentOperationLog, $notifyUser);
}
do_log($log);