mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
add torrent / magnet download links, remove locale references #25
This commit is contained in:
parent
d794e48a54
commit
4c519a56ba
1 changed files with 21 additions and 6 deletions
|
|
@ -682,6 +682,23 @@ class TorrentController extends AbstractController
|
|||
[
|
||||
'name' => $file->getName(),
|
||||
'size' => $file->getSize(),
|
||||
'url' => $this->generateUrl(
|
||||
'torrent_download_file',
|
||||
[
|
||||
'torrentId' => $torrent->getId()
|
||||
],
|
||||
false
|
||||
)
|
||||
],
|
||||
'magnet' =>
|
||||
[
|
||||
'url' => $this->generateUrl(
|
||||
'torrent_download_magnet',
|
||||
[
|
||||
'torrentId' => $torrent->getId()
|
||||
],
|
||||
false
|
||||
)
|
||||
],
|
||||
'scrape' =>
|
||||
[
|
||||
|
|
@ -1730,12 +1747,11 @@ class TorrentController extends AbstractController
|
|||
|
||||
// Torrent download file
|
||||
#[Route(
|
||||
'/{_locale}/torrent/{torrentId}/download/file',
|
||||
'/torrent/{torrentId}/download/file',
|
||||
name: 'torrent_download_file',
|
||||
requirements:
|
||||
[
|
||||
'_locale' => '%app.locales%',
|
||||
'torrentId' => '\d+',
|
||||
'torrentId' => '\d+'
|
||||
],
|
||||
methods:
|
||||
[
|
||||
|
|
@ -1857,12 +1873,11 @@ class TorrentController extends AbstractController
|
|||
|
||||
// Torrent download magnet
|
||||
#[Route(
|
||||
'/{_locale}/torrent/{torrentId}/download/magnet',
|
||||
'/torrent/{torrentId}/download/magnet',
|
||||
name: 'torrent_download_magnet',
|
||||
requirements:
|
||||
[
|
||||
'_locale' => '%app.locales%',
|
||||
'torrentId' => '\d+',
|
||||
'torrentId' => '\d+'
|
||||
],
|
||||
methods:
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue