mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Use the correct type when referring to info hash
This commit is contained in:
@@ -256,10 +256,14 @@ void TorrentsController::infoAction()
|
||||
const bool reverse {parseBool(params()["reverse"], false)};
|
||||
int limit {params()["limit"].toInt()};
|
||||
int offset {params()["offset"].toInt()};
|
||||
const QStringSet hashSet {List::toSet(params()["hashes"].split('|', QString::SkipEmptyParts))};
|
||||
const QStringList hashes {params()["hashes"].split('|', QString::SkipEmptyParts)};
|
||||
|
||||
InfoHashSet hashSet;
|
||||
for (const QString &hash : hashes)
|
||||
hashSet.insert(BitTorrent::InfoHash {hash});
|
||||
|
||||
QVariantList torrentList;
|
||||
TorrentFilter torrentFilter(filter, (hashSet.isEmpty() ? TorrentFilter::AnyHash : hashSet), category);
|
||||
TorrentFilter torrentFilter(filter, (hashes.isEmpty() ? TorrentFilter::AnyHash : hashSet), category);
|
||||
for (BitTorrent::TorrentHandle *const torrent : asConst(BitTorrent::Session::instance()->torrents()))
|
||||
{
|
||||
if (torrentFilter.match(torrent))
|
||||
|
||||
Reference in New Issue
Block a user