mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-02 16:29:49 -05:00
fix: refresh the torrent before sending to external tracker
We need to populate the status, seeders, leechers, and times_completed fields.
This commit is contained in:
@@ -314,6 +314,9 @@ class TorrentController extends BaseController
|
||||
// Save The Torrent
|
||||
$torrent->save();
|
||||
|
||||
// Populate the status/seeders/leechers/times_completed fields for the external tracker
|
||||
$torrent->refresh();
|
||||
|
||||
Unit3dAnnounce::addTorrent($torrent);
|
||||
|
||||
if ($torrent->featured) {
|
||||
|
||||
@@ -408,6 +408,9 @@ class TorrentController extends Controller
|
||||
'moderated_by' => User::SYSTEM_USER_ID,
|
||||
] + $request->safe()->except(['torrent']));
|
||||
|
||||
// Populate the status/seeders/leechers/times_completed fields for the external tracker
|
||||
$torrent->refresh();
|
||||
|
||||
Unit3dAnnounce::addTorrent($torrent);
|
||||
|
||||
if ($torrent->getAttribute('featured')) {
|
||||
|
||||
Reference in New Issue
Block a user