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

@@ -12,6 +12,8 @@ use Illuminate\Support\Facades\DB;
class DashboardRepository extends BaseRepository
{
const FILAMENT_VERSION = '2.13.15';
public function getSystemInfo(): array
{
$result = [];
@@ -37,7 +39,7 @@ class DashboardRepository extends BaseRepository
$result[$name] = [
'name' => $name,
'text' => nexus_trans("dashboard.system_info.$name"),
'value' => "2.13.14",
'value' => self::FILAMENT_VERSION,
];
$name = 'php_version';
$result[$name] = [

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);