Closed gubatron closed 6 years ago
so I understand now that pieces.count()
does not return the total number of pieces, but precisely what I was trying to do here, all the bits set to 1.
Still, I need to figure out why it crashes when I ask for pieces.getBit(n)
or pieces.swig().get_bit(n)
, perhaps the n
th bit position does not correspond the the piece index.
however, pieces.count()
is always returning 0
, even if the file is finished, when it's downloading, always returns 0.
I think the whole status.pieces() is broken.
it looks as if those methods don't actually exist, or they cannot be found, at least not by the debugger, and when called in runtime this must be the reason for the crash.
same for other methods I tried using, like isAllSet isNoneSet
I'm trying to obtain whether or not a piece has been downloaded the following way, perhaps I'm misunderstanding the API and I shouldn't be passing the piece index there.
Crash: