|
|
@ -559,13 +559,20 @@ void QTorrentHandle::downloading_pieces(bitfield &bf) const { |
|
|
|
|
|
|
|
|
|
|
|
bool QTorrentHandle::has_metadata() const { |
|
|
|
bool QTorrentHandle::has_metadata() const { |
|
|
|
#if LIBTORRENT_VERSION_MINOR > 15 |
|
|
|
#if LIBTORRENT_VERSION_MINOR > 15 |
|
|
|
torrent_status st = torrent_handle::status(0x0); |
|
|
|
return torrent_handle::status(query_distributed_copies).has_metadata; |
|
|
|
return st.has_metadata; |
|
|
|
|
|
|
|
#else |
|
|
|
#else |
|
|
|
return torrent_handle::has_metadata(); |
|
|
|
return torrent_handle::has_metadata(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
float QTorrentHandle::distributed_copies() const { |
|
|
|
|
|
|
|
#if LIBTORRENT_VERSION_MINOR > 15 |
|
|
|
|
|
|
|
return torrent_handle::status(0x0).distributed_copies; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
return torrent_handle::status().distributed_copies; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Setters
|
|
|
|
// Setters
|
|
|
|
//
|
|
|
|
//
|
|
|
|