From 25adf6b0619c80427c58b16e82c9f053264d01dc Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 3 Jan 2009 19:47:03 +0000 Subject: [PATCH] - Added a workaround fix for a bug in libtorrent regarding set_priority_up() function --- src/bittorrent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index e29f7e22a..f74afa16b 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -147,7 +147,9 @@ bool bittorrent::isQueueingEnabled() const { void bittorrent::increaseDlTorrentPriority(QString hash) { Q_ASSERT(queueingEnabled); QTorrentHandle h = getTorrentHandle(hash); - h.queue_position_up(); + // Check due to bug http://code.rasterbar.com/libtorrent/ticket/455 + if(h.queue_position() > 0) + h.queue_position_up(); } void bittorrent::decreaseDlTorrentPriority(QString hash) {