|
|
@ -72,6 +72,23 @@ class TorrentController extends AbstractController |
|
|
|
$user->getEvents() |
|
|
|
$user->getEvents() |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create trackers list |
|
|
|
|
|
|
|
$appTrackers = explode('|', $this->getParameter('app.trackers')); |
|
|
|
|
|
|
|
$allTrackers = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($appTrackers as $tracker) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$allTrackers[$tracker] = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($file->getAnnounceList() as $announce) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
foreach ($announce as $tracker) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$allTrackers[$tracker] = $user->isYggdrasil() && !in_array($tracker, $appTrackers); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Init page |
|
|
|
// Init page |
|
|
|
$page = $request->get('page') ? (int) $request->get('page') : 1; |
|
|
|
$page = $request->get('page') ? (int) $request->get('page') : 1; |
|
|
|
|
|
|
|
|
|
|
@ -145,14 +162,14 @@ class TorrentController extends AbstractController |
|
|
|
'source' => $file->getSource(), |
|
|
|
'source' => $file->getSource(), |
|
|
|
'comment' => $file->getComment(), |
|
|
|
'comment' => $file->getComment(), |
|
|
|
'tree' => $file->getFileTree(), |
|
|
|
'tree' => $file->getFileTree(), |
|
|
|
'trackers' => $file->getAnnounceList(), |
|
|
|
//'trackers' => $file->getAnnounceList(), |
|
|
|
'hash' => |
|
|
|
'hash' => |
|
|
|
[ |
|
|
|
[ |
|
|
|
'v1' => $file->getInfoHashV1(false), |
|
|
|
'v1' => $file->getInfoHashV1(false), |
|
|
|
'v2' => $file->getInfoHashV2(false) |
|
|
|
'v2' => $file->getInfoHashV2(false) |
|
|
|
], |
|
|
|
], |
|
|
|
], |
|
|
|
], |
|
|
|
'trackers' => explode('|', $this->getParameter('app.trackers')), |
|
|
|
'trackers' => $allTrackers, |
|
|
|
'activities' => $activityService->findLastActivitiesByTorrentId( |
|
|
|
'activities' => $activityService->findLastActivitiesByTorrentId( |
|
|
|
$torrent->getId(), |
|
|
|
$torrent->getId(), |
|
|
|
$user->getEvents(), |
|
|
|
$user->getEvents(), |
|
|
|