mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Use the correct type when referring to info hash
This commit is contained in:
parent
3485ad39d9
commit
9f0429ca6f
12 changed files with 152 additions and 160 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue