Browse Source

- Optimize startup speed (do not resave fastresume data for torrents that were seeded in the previous session)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
b80940ac4f
  1. 4
      src/bittorrent.cpp

4
src/bittorrent.cpp

@ -1823,6 +1823,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { @@ -1823,6 +1823,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
h.move_storage(save_dir.path());
}
}
bool was_already_seeded = TorrentPersistentData::isSeed(hash);
if(!was_already_seeded)
h.save_resume_data();
// Check if there are torrent files inside
for(int i=0; i<h.get_torrent_info().num_files(); ++i) {
@ -1844,7 +1846,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) { @@ -1844,7 +1846,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
}
// Recheck if the user asked to
if(Preferences::recheckTorrentsOnCompletion() && !TorrentPersistentData::isSeed(hash)) {
if(Preferences::recheckTorrentsOnCompletion() && !was_already_seeded) {
// Remember finished state
TorrentPersistentData::saveSeedStatus(h);
h.force_recheck();

Loading…
Cancel
Save