Browse Source

- Fixed torrent completed message (was not displayed due to last commit)

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
941b8c8d2a
  1. 3
      src/bittorrent.cpp

3
src/bittorrent.cpp

@ -1162,15 +1162,14 @@ void bittorrent::readAlerts() {
if (torrent_finished_alert* p = dynamic_cast<torrent_finished_alert*>(a.get())) { if (torrent_finished_alert* p = dynamic_cast<torrent_finished_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
if(h.is_valid()){ if(h.is_valid()){
emit finishedTorrent(h);
QString hash = h.hash(); QString hash = h.hash();
// Create .paused file if necessary // Create .paused file if necessary
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.write(" ");
finished_file.close(); finished_file.close();
h.save_resume_data(); h.save_resume_data();
qDebug("Received finished alert for %s", h.name().toUtf8().data()); qDebug("Received finished alert for %s", h.name().toUtf8().data());
emit finishedTorrent(h);
} }
} }
else if (save_resume_data_alert* p = dynamic_cast<save_resume_data_alert*>(a.get())) { else if (save_resume_data_alert* p = dynamic_cast<save_resume_data_alert*>(a.get())) {

Loading…
Cancel
Save