diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index a168f85..78edd63 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -443,6 +443,11 @@ class TorrentController extends AbstractController [ 'name' => $file->getName(), 'size' => $file->getSize(), + 'hash' => + [ + 'v1' => $file->getInfoHashV1(false), + 'v2' => $file->getInfoHashV2(false) + ], ], 'scrape' => [ diff --git a/templates/default/torrent/list.html.twig b/templates/default/torrent/list.html.twig index 8f358df..f4ed3e5 100644 --- a/templates/default/torrent/list.html.twig +++ b/templates/default/torrent/list.html.twig @@ -28,19 +28,33 @@ {% endif %} {% if torrent.approved == false %} - + {% endif %} {% if torrent.sensitive == true %} - + {% endif %} + {% if torrent.file.hash.v2 %} + + + + + + {% endif %} + {% if torrent.file.hash.v1 and torrent.file.hash.v2 %} + + + + + + {% endif %} {% if torrent.keywords %}