Improve tracker entries handling

PR #19496.

* Add torrent entry status to represent tracker error
* Add torrent entry status to represent unreachable endpoint
* Display tracker entry next/min announce time
* Reset tracker entries when torrent is stopped
This commit is contained in:
Vladimir Golovnev
2023-09-07 08:58:13 +03:00
committed by GitHub
parent 2f94c92df9
commit 7cd2445a49
11 changed files with 239 additions and 69 deletions

View File

@@ -264,7 +264,8 @@ namespace BitTorrent
void saveResumeData(lt::resume_data_flags_t flags = {});
void handleMoveStorageJobFinished(const Path &path, MoveStorageContext context, bool hasOutstandingJob);
void fileSearchFinished(const Path &savePath, const PathList &fileNames);
TrackerEntry updateTrackerEntry(const lt::announce_entry &announceEntry, const QHash<TrackerEntry::Endpoint, QMap<int, int> > &updateInfo);
TrackerEntry updateTrackerEntry(const lt::announce_entry &announceEntry, const QHash<TrackerEntry::Endpoint, QMap<int, int>> &updateInfo);
void resetTrackerEntries();
private:
using EventTrigger = std::function<void ()>;