1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-31 00:44:19 +00:00

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

This commit is contained in:
Christophe Dumez 2008-06-26 17:31:29 +00:00
parent 949678a4d3
commit d916bfd73e
2 changed files with 13 additions and 4 deletions

View File

@ -17,6 +17,7 @@
- FEATURE: Allow to add several trackers at once - FEATURE: Allow to add several trackers at once
- BUGFIX: Do not display seeds number in seeding list (always 0) - BUGFIX: Do not display seeds number in seeding list (always 0)
- BUGFIX: Threadified IP filter file parser to avoid GUI freeze - 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: Do not display progress bar in seeding list (always 100%)
- COSMETIC: Added a progress bar for torrent creation - COSMETIC: Added a progress bar for torrent creation
- COSMETIC: Display tracker errors in a cleaner way - COSMETIC: Display tracker errors in a cleaner way

View File

@ -31,6 +31,7 @@
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QHeaderView> #include <QHeaderView>
#include <QMenu> #include <QMenu>
#include <QMessageBox>
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){
setupUi(this); setupUi(this);
@ -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.)) { 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! // What are you doing here? go back to download tab!
qDebug("Info: a torrent was moved from finished to download tab"); 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);
deleteTorrent(hash); if (reponse == QMessageBox::Yes) {
BTSession->setFinishedTorrent(hash); qDebug("Info: a torrent was moved from finished to download tab");
emit torrentMovedFromFinishedList(hash); deleteTorrent(hash);
BTSession->setFinishedTorrent(hash);
emit torrentMovedFromFinishedList(hash);
}
else if (reponse == QMessageBox::No) {
qDebug("Deleted from the finished");
BTSession->deleteTorrent(hash, true);
}
continue; continue;
} }
if(h.state() == torrent_status::checking_files){ if(h.state() == torrent_status::checking_files){