Merge pull request #10895 from Chocobo1/tracker

Add dialog to mass edit torrent's tracker
This commit is contained in:
Mike Tzou
2019-07-12 10:59:50 +08:00
committed by GitHub
9 changed files with 288 additions and 11 deletions

View File

@@ -154,5 +154,11 @@ const lt::announce_entry &TrackerEntry::nativeEntry() const
bool BitTorrent::operator==(const TrackerEntry &left, const TrackerEntry &right)
{
return (QUrl(left.url()) == QUrl(right.url()));
return ((left.tier() == right.tier())
&& QUrl(left.url()) == QUrl(right.url()));
}
uint BitTorrent::qHash(const TrackerEntry &key, const uint seed)
{
return (::qHash(key.url(), seed) ^ key.tier());
}

View File

@@ -31,6 +31,8 @@
#include <libtorrent/announce_entry.hpp>
#include <QtGlobal>
class QString;
namespace BitTorrent
@@ -70,6 +72,7 @@ namespace BitTorrent
};
bool operator==(const TrackerEntry &left, const TrackerEntry &right);
uint qHash(const TrackerEntry &key, uint seed);
}
#endif // BITTORRENT_TRACKERENTRY_H