mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Improve "info hash" handling
Define "torrent ID" concept, which is either a SHA1 hash for torrents of version 1, or a SHA256 hash (truncated to SHA1 hash length) for torrents of version 2. Add support for native libtorrent2 info hashes.
This commit is contained in:
@@ -99,15 +99,15 @@ void TransferListSortModel::disableTagFilter()
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransferListSortModel::setTrackerFilter(const QSet<BitTorrent::InfoHash> &hashes)
|
||||
void TransferListSortModel::setTrackerFilter(const QSet<BitTorrent::TorrentID> &torrentIDs)
|
||||
{
|
||||
if (m_filter.setHashSet(hashes))
|
||||
if (m_filter.setTorrentIDSet(torrentIDs))
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransferListSortModel::disableTrackerFilter()
|
||||
{
|
||||
if (m_filter.setHashSet(TorrentFilter::AnyHash))
|
||||
if (m_filter.setTorrentIDSet(TorrentFilter::AnyID))
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user