mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Replace "seeding_duration" with "finished_duration" everywhere
Closes #10223. PR #13601.
This commit is contained in:
parent
d6fc020ba7
commit
d3bdeaab3f
@ -1651,7 +1651,7 @@ void Session::processShareLimits()
|
|||||||
|
|
||||||
if (torrent->seedingTimeLimit() != Torrent::NO_SEEDING_TIME_LIMIT)
|
if (torrent->seedingTimeLimit() != Torrent::NO_SEEDING_TIME_LIMIT)
|
||||||
{
|
{
|
||||||
const qlonglong seedingTimeInMinutes = torrent->seedingTime() / 60;
|
const qlonglong seedingTimeInMinutes = torrent->finishedTime() / 60;
|
||||||
int seedingTimeLimit = torrent->seedingTimeLimit();
|
int seedingTimeLimit = torrent->seedingTimeLimit();
|
||||||
if (seedingTimeLimit == Torrent::USE_GLOBAL_SEEDING_TIME)
|
if (seedingTimeLimit == Torrent::USE_GLOBAL_SEEDING_TIME)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,6 @@ namespace BitTorrent
|
|||||||
virtual qlonglong totalUpload() const = 0;
|
virtual qlonglong totalUpload() const = 0;
|
||||||
virtual qlonglong activeTime() const = 0;
|
virtual qlonglong activeTime() const = 0;
|
||||||
virtual qlonglong finishedTime() const = 0;
|
virtual qlonglong finishedTime() const = 0;
|
||||||
virtual qlonglong seedingTime() const = 0;
|
|
||||||
virtual qlonglong eta() const = 0;
|
virtual qlonglong eta() const = 0;
|
||||||
virtual QVector<qreal> filesProgress() const = 0;
|
virtual QVector<qreal> filesProgress() const = 0;
|
||||||
virtual int seedsCount() const = 0;
|
virtual int seedsCount() const = 0;
|
||||||
|
@ -221,7 +221,6 @@ namespace
|
|||||||
status.flags = params.flags;
|
status.flags = params.flags;
|
||||||
status.active_duration = lt::seconds {params.active_time};
|
status.active_duration = lt::seconds {params.active_time};
|
||||||
status.finished_duration = lt::seconds {params.finished_time};
|
status.finished_duration = lt::seconds {params.finished_time};
|
||||||
status.seeding_duration = lt::seconds {params.seeding_time};
|
|
||||||
status.num_complete = params.num_complete;
|
status.num_complete = params.num_complete;
|
||||||
status.num_incomplete = params.num_incomplete;
|
status.num_incomplete = params.num_incomplete;
|
||||||
status.all_time_download = params.total_downloaded;
|
status.all_time_download = params.total_downloaded;
|
||||||
@ -1066,11 +1065,6 @@ qlonglong TorrentImpl::finishedTime() const
|
|||||||
return lt::total_seconds(m_nativeStatus.finished_duration);
|
return lt::total_seconds(m_nativeStatus.finished_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
qlonglong TorrentImpl::seedingTime() const
|
|
||||||
{
|
|
||||||
return lt::total_seconds(m_nativeStatus.seeding_duration);
|
|
||||||
}
|
|
||||||
|
|
||||||
qlonglong TorrentImpl::eta() const
|
qlonglong TorrentImpl::eta() const
|
||||||
{
|
{
|
||||||
if (isPaused()) return MAX_ETA;
|
if (isPaused()) return MAX_ETA;
|
||||||
@ -1099,7 +1093,7 @@ qlonglong TorrentImpl::eta() const
|
|||||||
|
|
||||||
if (maxSeedingTimeValue >= 0)
|
if (maxSeedingTimeValue >= 0)
|
||||||
{
|
{
|
||||||
seedingTimeEta = (maxSeedingTimeValue * 60) - seedingTime();
|
seedingTimeEta = (maxSeedingTimeValue * 60) - finishedTime();
|
||||||
if (seedingTimeEta < 0)
|
if (seedingTimeEta < 0)
|
||||||
seedingTimeEta = 0;
|
seedingTimeEta = 0;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,6 @@ namespace BitTorrent
|
|||||||
qlonglong totalUpload() const override;
|
qlonglong totalUpload() const override;
|
||||||
qlonglong activeTime() const override;
|
qlonglong activeTime() const override;
|
||||||
qlonglong finishedTime() const override;
|
qlonglong finishedTime() const override;
|
||||||
qlonglong seedingTime() const override;
|
|
||||||
qlonglong eta() const override;
|
qlonglong eta() const override;
|
||||||
QVector<qreal> filesProgress() const override;
|
QVector<qreal> filesProgress() const override;
|
||||||
int seedsCount() const override;
|
int seedsCount() const override;
|
||||||
|
@ -439,7 +439,7 @@ void PropertiesWidget::loadDynamicData()
|
|||||||
if (m_torrent->isSeed())
|
if (m_torrent->isSeed())
|
||||||
elapsedString = tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
|
elapsedString = tr("%1 (seeded for %2)", "e.g. 4m39s (seeded for 3m10s)")
|
||||||
.arg(Utils::Misc::userFriendlyDuration(m_torrent->activeTime())
|
.arg(Utils::Misc::userFriendlyDuration(m_torrent->activeTime())
|
||||||
, Utils::Misc::userFriendlyDuration(m_torrent->seedingTime()));
|
, Utils::Misc::userFriendlyDuration(m_torrent->finishedTime()));
|
||||||
else
|
else
|
||||||
elapsedString = Utils::Misc::userFriendlyDuration(m_torrent->activeTime());
|
elapsedString = Utils::Misc::userFriendlyDuration(m_torrent->activeTime());
|
||||||
m_ui->labelElapsedVal->setText(elapsedString);
|
m_ui->labelElapsedVal->setText(elapsedString);
|
||||||
|
@ -390,7 +390,7 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
|
|||||||
case TR_AMOUNT_LEFT:
|
case TR_AMOUNT_LEFT:
|
||||||
return unitString(torrent->remainingSize());
|
return unitString(torrent->remainingSize());
|
||||||
case TR_TIME_ELAPSED:
|
case TR_TIME_ELAPSED:
|
||||||
return timeElapsedString(torrent->activeTime(), torrent->seedingTime());
|
return timeElapsedString(torrent->activeTime(), torrent->finishedTime());
|
||||||
case TR_SAVE_PATH:
|
case TR_SAVE_PATH:
|
||||||
return Utils::Fs::toNativePath(torrent->savePath());
|
return Utils::Fs::toNativePath(torrent->savePath());
|
||||||
case TR_COMPLETED:
|
case TR_COMPLETED:
|
||||||
@ -459,7 +459,7 @@ QVariant TransferListModel::internalValue(const BitTorrent::Torrent *torrent, co
|
|||||||
case TR_AMOUNT_LEFT:
|
case TR_AMOUNT_LEFT:
|
||||||
return torrent->remainingSize();
|
return torrent->remainingSize();
|
||||||
case TR_TIME_ELAPSED:
|
case TR_TIME_ELAPSED:
|
||||||
return !alt ? torrent->activeTime() : torrent->seedingTime();
|
return !alt ? torrent->activeTime() : torrent->finishedTime();
|
||||||
case TR_SAVE_PATH:
|
case TR_SAVE_PATH:
|
||||||
return Utils::Fs::toNativePath(torrent->savePath());
|
return Utils::Fs::toNativePath(torrent->savePath());
|
||||||
case TR_COMPLETED:
|
case TR_COMPLETED:
|
||||||
|
@ -153,7 +153,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
|||||||
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toSecsSinceEpoch()},
|
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, torrent.lastSeenComplete().toSecsSinceEpoch()},
|
||||||
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
|
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
|
||||||
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},
|
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},
|
||||||
{KEY_TORRENT_SEEDING_TIME, torrent.seedingTime()},
|
{KEY_TORRENT_SEEDING_TIME, torrent.finishedTime()},
|
||||||
{KEY_TORRENT_LAST_ACTIVITY_TIME, getLastActivityTime()},
|
{KEY_TORRENT_LAST_ACTIVITY_TIME, getLastActivityTime()},
|
||||||
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ void TorrentsController::propertiesAction()
|
|||||||
dataDict[KEY_TORRENT_INFOHASHV1] = torrent->infoHash().v1().toString();
|
dataDict[KEY_TORRENT_INFOHASHV1] = torrent->infoHash().v1().toString();
|
||||||
dataDict[KEY_TORRENT_INFOHASHV2] = torrent->infoHash().v2().toString();
|
dataDict[KEY_TORRENT_INFOHASHV2] = torrent->infoHash().v2().toString();
|
||||||
dataDict[KEY_PROP_TIME_ELAPSED] = torrent->activeTime();
|
dataDict[KEY_PROP_TIME_ELAPSED] = torrent->activeTime();
|
||||||
dataDict[KEY_PROP_SEEDING_TIME] = torrent->seedingTime();
|
dataDict[KEY_PROP_SEEDING_TIME] = torrent->finishedTime();
|
||||||
dataDict[KEY_PROP_ETA] = static_cast<double>(torrent->eta());
|
dataDict[KEY_PROP_ETA] = static_cast<double>(torrent->eta());
|
||||||
dataDict[KEY_PROP_CONNECT_COUNT] = torrent->connectionsCount();
|
dataDict[KEY_PROP_CONNECT_COUNT] = torrent->connectionsCount();
|
||||||
dataDict[KEY_PROP_CONNECT_COUNT_LIMIT] = torrent->connectionsLimit();
|
dataDict[KEY_PROP_CONNECT_COUNT_LIMIT] = torrent->connectionsLimit();
|
||||||
|
Loading…
Reference in New Issue
Block a user