Update torrentimpl.cpp

changed idiot ratio/sedd_time to reasonable uploaded/seed_time
This commit is contained in:
dm-mb 2025-04-25 20:20:14 +03:00 committed by GitHub
commit 201923f4f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<qreal, std::chrono::months::period>;
const auto activeMonths = std::chrono::duration_cast<months>(m_nativeStatus.active_duration).count();
return (activeMonths > 0) ? (realRatio() / activeMonths) : 0;
using days = std::chrono::duration<qreal, std::chrono::days::period>;
const auto activeDays = std::chrono::duration_cast<days>(m_nativeStatus.active_duration).count();
return (activeDays > 0) ? (totalUpload() / activeDays) : 0;
}
void TorrentImpl::setName(const QString &name)