mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 06:13:36 -07:00
Update torrentimpl.cpp
changed idiot ratio/sedd_time to reasonable uploaded/seed_time
This commit is contained in:
parent
0b3bce8993
commit
201923f4f5
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue