mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
- Queueing system should work fine now (port is complete, needs testing)
This commit is contained in:
parent
f3729fbae6
commit
9b67807926
11 changed files with 105 additions and 181 deletions
|
@ -85,7 +85,12 @@ bool QTorrentHandle::is_valid() const {
|
|||
|
||||
bool QTorrentHandle::is_paused() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.is_paused();
|
||||
return h.is_paused() && !h.is_auto_managed();
|
||||
}
|
||||
|
||||
bool QTorrentHandle::is_queued() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.is_paused() && h.is_auto_managed();
|
||||
}
|
||||
|
||||
size_type QTorrentHandle::total_size() const {
|
||||
|
@ -281,6 +286,11 @@ bool QTorrentHandle::is_seed() const {
|
|||
return h.is_seed();
|
||||
}
|
||||
|
||||
bool QTorrentHandle::is_auto_managed() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.is_auto_managed();
|
||||
}
|
||||
|
||||
//
|
||||
// Setters
|
||||
//
|
||||
|
@ -297,11 +307,13 @@ void QTorrentHandle::set_upload_limit(int limit) {
|
|||
|
||||
void QTorrentHandle::pause() {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.auto_managed(false);
|
||||
h.pause();
|
||||
}
|
||||
|
||||
void QTorrentHandle::resume() {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.auto_managed(true);
|
||||
h.resume();
|
||||
}
|
||||
|
||||
|
@ -340,6 +352,11 @@ void QTorrentHandle::replace_trackers(std::vector<announce_entry> const& v) cons
|
|||
h.replace_trackers(v);
|
||||
}
|
||||
|
||||
void QTorrentHandle::auto_managed(bool b) const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.auto_managed(b);
|
||||
}
|
||||
|
||||
void QTorrentHandle::queue_position_down() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.queue_position_down();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue