Browse Source

- Added some debug

- On torrent completion, save its fastresume data *AFTER* it was moved to final directory to avoid big problems (oops)
adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
04cbd91f04
  1. 1
      src/FinishedTorrents.cpp
  2. 2
      src/bittorrent.cpp

1
src/FinishedTorrents.cpp

@ -347,6 +347,7 @@ void FinishedTorrents::forceRecheck(){
if(index.column() == F_NAME){ if(index.column() == F_NAME){
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString(); QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
qDebug("Forcing recheck for torrent %s", hash.toUtf8().data());
h.force_recheck(); h.force_recheck();
} }
} }

2
src/bittorrent.cpp

@ -1140,7 +1140,6 @@ void bittorrent::readAlerts() {
QFile finished_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished"); QFile finished_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished");
finished_file.open(QIODevice::WriteOnly | QIODevice::Text); finished_file.open(QIODevice::WriteOnly | QIODevice::Text);
finished_file.close(); finished_file.close();
h.save_resume_data();
// Move to download directory if necessary // Move to download directory if necessary
if(!defaultTempPath.isEmpty()) { if(!defaultTempPath.isEmpty()) {
// Check if directory is different // Check if directory is different
@ -1150,6 +1149,7 @@ void bittorrent::readAlerts() {
h.move_storage(save_dir.path()); h.move_storage(save_dir.path());
} }
} }
h.save_resume_data();
qDebug("Received finished alert for %s", h.name().toUtf8().data()); qDebug("Received finished alert for %s", h.name().toUtf8().data());
} }
} }

Loading…
Cancel
Save