Browse Source

- Make use of h.is_seed() instead of h.progress() == 1.

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
a622152747
  1. 2
      src/FinishedTorrents.cpp
  2. 5
      src/qtorrenthandle.cpp
  3. 1
      src/qtorrenthandle.h

2
src/FinishedTorrents.cpp

@ -265,7 +265,7 @@ void FinishedTorrents::updateFinishedList(){
if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) { if(BTSession->getTorrentsToPauseAfterChecking().indexOf(hash) != -1) {
continue; continue;
} }
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) { if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.is_seed())) {
// What are you doing here? go back to download tab! // What are you doing here? go back to download tab!
int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No); int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No);
if (reponse == QMessageBox::Yes) { if (reponse == QMessageBox::Yes) {

5
src/qtorrenthandle.cpp

@ -261,6 +261,11 @@ int QTorrentHandle::num_uploads() const {
return h.status().num_uploads; return h.status().num_uploads;
} }
bool QTorrentHandle::is_seed() const {
Q_ASSERT(h.is_valid());
return h.is_seed();
}
// //
// Setters // Setters
// //

1
src/qtorrenthandle.h

@ -89,6 +89,7 @@ class QTorrentHandle {
size_type total_payload_upload(); size_type total_payload_upload();
QStringList files_path() const; QStringList files_path() const;
int num_uploads() const; int num_uploads() const;
bool is_seed() const;
// //
// Setters // Setters

Loading…
Cancel
Save