add: link to torrent in torrent comment

This commit is contained in:
Roardom
2022-08-09 17:07:05 -05:00
parent 2fc3a01d78
commit 1a2a2306eb
@@ -80,8 +80,12 @@ class TorrentDownloadController extends Controller
if ($request->user() || ($rsskey && $user)) {
// Set the announce key and add the user passkey
$dict['announce'] = \route('announce', ['passkey' => $user->passkey]);
// Remove Other announce url
unset($dict['announce-list']);
// Set link to torrent as the comment
if (config('torrent.comment')) {
$dict['comment'] = \config('torrent.comment').'. '.\route('torrent', ['id' => $id]);
} else {
$dict['comment'] = \route('torrent', ['id' => $id]);
}
} else {
return \to_route('login');
}