Avoid potentially setting the wrong piece priorities

Updating file priorities is an async operation in libtorrent, when we
just updated it and immediately query it, we might get the
old/wrong values, so we rely on `updatedFilePrio` in this case.
This commit is contained in:
Chocobo1
2018-07-29 16:14:17 +08:00
committed by sledgehammer999
parent 70291014d1
commit a5e68a8725
2 changed files with 12 additions and 3 deletions

View File

@@ -420,6 +420,7 @@ namespace BitTorrent
bool addTracker(const TrackerEntry &tracker);
bool addUrlSeed(const QUrl &urlSeed);
bool removeUrlSeed(const QUrl &urlSeed);
void setFirstLastPiecePriorityImpl(bool enabled, const QVector<int> &updatedFilePrio = {});
Session *const m_session;
libtorrent::torrent_handle m_nativeHandle;