mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-10-06 05:37:53 +00:00
check if magnet is not ready for status update and tracket info
This commit is contained in:
@@ -707,6 +707,7 @@ namespace torrents
|
||||
|
||||
bool Torrent::UpdateStatus (uint64_t ts)
|
||||
{
|
||||
if (!m_Length) return false; // non ready magnet
|
||||
bool complete = true;
|
||||
for (auto& it: m_Pieces)
|
||||
{
|
||||
|
||||
@@ -441,8 +441,9 @@ namespace torrents
|
||||
tracker["lastAnnounceSucceeded"] = false;
|
||||
}
|
||||
tracker["lastAnnounceTimedOut"] = false; // TODO:
|
||||
tracker["nextAnnounceTime"] = (torrent->GetNextTrackerRequestTime (i) -
|
||||
i2p::util::GetMonotonicMilliseconds () + i2p::util::GetMillisecondsSinceEpoch ())/1000;
|
||||
auto nextRequestTime = torrent->GetNextTrackerRequestTime (i);
|
||||
tracker["nextAnnounceTime"] = ((nextRequestTime ? torrent->GetNextTrackerRequestTime (i) -
|
||||
i2p::util::GetMonotonicMilliseconds () : 0) + i2p::util::GetMillisecondsSinceEpoch ())/1000;
|
||||
tracker["lastAnnounceTime"] = torrent->GetLastTrackerUpdateTime (i);
|
||||
tracker["lastAnnounceStartTime"] = torrent->GetLastTrackerUpdateTime (i); // TODO:
|
||||
tracker["lastScrapeTime"] = 0;
|
||||
|
||||
Reference in New Issue
Block a user