From 31bed20b4b8fd6bdd3aabfded6d18f196d937702 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 19 Oct 2023 04:41:19 +0300 Subject: [PATCH] update download routes #25 --- src/Controller/TorrentController.php | 12 ++++++------ templates/default/torrent/info.html.twig | 4 ++-- templates/default/torrent/list.html.twig | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 6bcdcfc..be9fd4d 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -683,7 +683,7 @@ class TorrentController extends AbstractController 'name' => $file->getName(), 'size' => $file->getSize(), 'url' => $this->generateUrl( - 'torrent_download_file', + 'torrent_file', [ 'torrentId' => $torrent->getId() ], @@ -693,7 +693,7 @@ class TorrentController extends AbstractController 'magnet' => [ 'url' => $this->generateUrl( - 'torrent_download_magnet', + 'torrent_magnet', [ 'torrentId' => $torrent->getId() ], @@ -1747,8 +1747,8 @@ class TorrentController extends AbstractController // Torrent download file #[Route( - '/torrent/{torrentId}/download/file', - name: 'torrent_download_file', + '/torrent/{torrentId}/file', + name: 'torrent_file', requirements: [ 'torrentId' => '\d+' @@ -1873,8 +1873,8 @@ class TorrentController extends AbstractController // Torrent download magnet #[Route( - '/torrent/{torrentId}/download/magnet', - name: 'torrent_download_magnet', + '/torrent/{torrentId}/magnet', + name: 'torrent_magnet', requirements: [ 'torrentId' => '\d+' diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index ecd174b..f59c5a4 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -33,7 +33,7 @@ {#{{ 'Torrent' | trans }} #{{ torrent.id }}#}
- + {% if torrent.download.magnet.exist %} @@ -47,7 +47,7 @@ {{ torrent.download.magnet.total }} - + {% if torrent.download.file.exist %} diff --git a/templates/default/torrent/list.html.twig b/templates/default/torrent/list.html.twig index 4d8c6ea..909e0ee 100644 --- a/templates/default/torrent/list.html.twig +++ b/templates/default/torrent/list.html.twig @@ -117,7 +117,7 @@