From 201923f4f5c9e1baa35879c69ea5fe1da467c776 Mon Sep 17 00:00:00 2001 From: dm-mb <93314275+dm-mb@users.noreply.github.com> Date: Fri, 25 Apr 2025 20:20:14 +0300 Subject: [PATCH] Update torrentimpl.cpp changed idiot ratio/sedd_time to reasonable uploaded/seed_time --- src/base/bittorrent/torrentimpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 45cc7f3bf..c52f7302b 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -1593,9 +1593,9 @@ qreal TorrentImpl::popularity() const { // in order to produce floating-point numbers using `std::chrono::duration_cast`, // we should use `qreal` as `Rep` to define the `months` duration - using months = std::chrono::duration; - const auto activeMonths = std::chrono::duration_cast(m_nativeStatus.active_duration).count(); - return (activeMonths > 0) ? (realRatio() / activeMonths) : 0; + using days = std::chrono::duration; + const auto activeDays = std::chrono::duration_cast(m_nativeStatus.active_duration).count(); + return (activeDays > 0) ? (totalUpload() / activeDays) : 0; } void TorrentImpl::setName(const QString &name)