From 8cf99058464fa0fbbc8d975b250b79b02b2911e0 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 15 Oct 2023 07:03:23 +0300 Subject: [PATCH] order tags by file size --- src/Controller/TorrentController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 078bad9..a168f85 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -271,12 +271,12 @@ class TorrentController extends AbstractController if (isset($keywords[$keyword])) { - $keywords[$keyword]++; + $keywords[$keyword] = $keywords[$keyword] + (int) $item['size']; } else { - $keywords[$keyword] = 1; + $keywords[$keyword] = 0; } } } @@ -420,12 +420,12 @@ class TorrentController extends AbstractController if (isset($keywords[$keyword])) { - $keywords[$keyword]++; + $keywords[$keyword] = $keywords[$keyword] + (int) $item['size']; } else { - $keywords[$keyword] = 1; + $keywords[$keyword] = 0; } } }