mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
committed by
Vladimir Golovnev (Glassez)
parent
92db0170d5
commit
2f8044bd26
@@ -1364,11 +1364,13 @@ QBitArray TorrentImpl::pieces() const
|
|||||||
|
|
||||||
QBitArray TorrentImpl::downloadingPieces() const
|
QBitArray TorrentImpl::downloadingPieces() const
|
||||||
{
|
{
|
||||||
QBitArray result(piecesCount());
|
if (!hasMetadata())
|
||||||
|
return {};
|
||||||
|
|
||||||
std::vector<lt::partial_piece_info> queue;
|
std::vector<lt::partial_piece_info> queue;
|
||||||
m_nativeHandle.get_download_queue(queue);
|
m_nativeHandle.get_download_queue(queue);
|
||||||
|
|
||||||
|
QBitArray result {piecesCount()};
|
||||||
for (const lt::partial_piece_info &info : queue)
|
for (const lt::partial_piece_info &info : queue)
|
||||||
result.setBit(LT::toUnderlyingType(info.piece_index));
|
result.setBit(LT::toUnderlyingType(info.piece_index));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user