make torrent::have_piece support magnet links
This commit is contained in:
parent
3cf7d0a7a2
commit
a7f1d7df91
|
@ -500,7 +500,9 @@ namespace libtorrent
|
|||
// returns true if we have downloaded the given piece
|
||||
bool have_piece(int index) const
|
||||
{
|
||||
return has_picker()?m_picker->have_piece(index):true;
|
||||
if (!valid_metadata()) return false;
|
||||
if (!has_picker()) return true;
|
||||
return m_picker->have_piece(index);
|
||||
}
|
||||
|
||||
// called when we learn that we have a piece
|
||||
|
|
Loading…
Reference in New Issue