Browse Source

- Ask if we want to redownload a torrent if its content gets deleted from hard drive (patch from e-stealth)

adaptive-webui-19844
Christophe Dumez 17 years ago
parent
commit
d916bfd73e
  1. 1
      Changelog
  2. 16
      src/FinishedTorrents.cpp

1
Changelog

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
- FEATURE: Allow to add several trackers at once
- BUGFIX: Do not display seeds number in seeding list (always 0)
- BUGFIX: Threadified IP filter file parser to avoid GUI freeze
- BUGFIX: Ask if we want to redownload if content was deleted from hard drive
- COSMETIC: Do not display progress bar in seeding list (always 100%)
- COSMETIC: Added a progress bar for torrent creation
- COSMETIC: Display tracker errors in a cleaner way

16
src/FinishedTorrents.cpp

@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
#include <QStandardItemModel>
#include <QHeaderView>
#include <QMenu>
#include <QMessageBox>
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){
setupUi(this);
@ -242,10 +243,17 @@ void FinishedTorrents::updateFinishedList(){ @@ -242,10 +243,17 @@ void FinishedTorrents::updateFinishedList(){
}
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
// What are you doing here? go back to download tab!
qDebug("Info: a torrent was moved from finished to download tab");
deleteTorrent(hash);
BTSession->setFinishedTorrent(hash);
emit torrentMovedFromFinishedList(hash);
int reponse = QMessageBox::question(this, tr("Finished torrent not found"), tr("Would you like to put it put it in the download list ?"), QMessageBox::Yes | QMessageBox::No);
if (reponse == QMessageBox::Yes) {
qDebug("Info: a torrent was moved from finished to download tab");
deleteTorrent(hash);
BTSession->setFinishedTorrent(hash);
emit torrentMovedFromFinishedList(hash);
}
else if (reponse == QMessageBox::No) {
qDebug("Deleted from the finished");
BTSession->deleteTorrent(hash, true);
}
continue;
}
if(h.state() == torrent_status::checking_files){

Loading…
Cancel
Save