Use the torrent_status for the queue_position too.

This commit is contained in:
sledgehammer999
2014-06-04 20:10:37 +03:00
parent 83ba59de51
commit a361c0ea03
4 changed files with 12 additions and 7 deletions

View File

@@ -317,9 +317,7 @@ bool QTorrentHandle::has_missing_files() const {
}
int QTorrentHandle::queue_position() const {
if (torrent_handle::queue_position() < 0)
return -1;
return torrent_handle::queue_position()+1;
return queue_position(status(0x0));
}
bool QTorrentHandle::is_seed() const {
@@ -621,6 +619,12 @@ bool QTorrentHandle::is_paused(const libtorrent::torrent_status &status) {
return status.paused && !status.auto_managed;
}
int QTorrentHandle::queue_position(const libtorrent::torrent_status &status) {
if (status.queue_position < 0)
return -1;
return status.queue_position+1;
}
bool QTorrentHandle::is_queued(const libtorrent::torrent_status &status) {
return status.paused && status.auto_managed;
}