Browse Source

BUGFIX: Torrents are no longer starting from scratch when changing default save path (when torrent addition dialog is disabled)

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
276dfd9df6
  1. 1
      Changelog
  2. 2
      src/FinishedTorrents.cpp
  3. 7
      src/bittorrent.cpp

1
Changelog

@ -9,6 +9,7 @@
- BUGFIX: Totally rewritten Web UI list refresh system (fixed memory leak) - BUGFIX: Totally rewritten Web UI list refresh system (fixed memory leak)
- BUGFIX: Disable ETA calculation when ETA column is hidden - BUGFIX: Disable ETA calculation when ETA column is hidden
- BUGFIX: Removed "disconnected" connection state, detection was far from perfect - BUGFIX: Removed "disconnected" connection state, detection was far from perfect
- BUGFIX: Torrents are no longer starting from scratch when changing default save path (when torrent addition dialog is disabled)
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar - COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
- COSMETIC: RSS Tab is now hidden as a default - COSMETIC: RSS Tab is now hidden as a default
- COSMETIC: Allow to hide or display top toolbar - COSMETIC: Allow to hide or display top toolbar

2
src/FinishedTorrents.cpp

@ -280,7 +280,7 @@ void FinishedTorrents::updateFinishedList(){
} }
} }
if(h.is_paused()) continue; if(h.is_paused()) continue;
if(h.state() == torrent_status::downloading /*|| (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && !h.is_seed())*/) { 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) {

7
src/bittorrent.cpp

@ -957,6 +957,13 @@ void bittorrent::addTorrent(QString path, bool fromScanDir, QString from_url, bo
catch (fs::filesystem_error&) {} catch (fs::filesystem_error&) {}
} }
QString savePath = getSavePath(hash); QString savePath = getSavePath(hash);
// Save save_path to hard drive
QFile savepath_file(misc::qBittorrentPath()+QString::fromUtf8("BT_backup")+QDir::separator()+hash+QString::fromUtf8(".savepath"));
if(!savepath_file.exists()) {
savepath_file.open(QIODevice::WriteOnly | QIODevice::Text);
savepath_file.write(savePath.toUtf8());
savepath_file.close();
}
// Adding files to bittorrent session // Adding files to bittorrent session
if(preAllocateAll) { if(preAllocateAll) {
h = s->add_torrent(t, fs::path(savePath.toUtf8().data()), resume_data, storage_mode_allocate, true); h = s->add_torrent(t, fs::path(savePath.toUtf8().data()), resume_data, storage_mode_allocate, true);

Loading…
Cancel
Save