Export torrents added only after the setting was enabled.

This commit is contained in:
sledgehammer999 2016-10-29 19:11:02 +03:00
parent 124eddc68c
commit b97cb7422f

View file

@ -445,11 +445,6 @@ Session::Session(QObject *parent)
populateAdditionalTrackers(); populateAdditionalTrackers();
enableTracker(isTrackerEnabled()); enableTracker(isTrackerEnabled());
if (!torrentExportDirectory().isEmpty()) {
qDebug("Torrent export is enabled, exporting the current torrents");
foreach (TorrentHandle *const torrent, m_torrents)
exportTorrentFile(torrent);
}
connect(Net::ProxyConfigurationManager::instance(), SIGNAL(proxyConfigurationChanged()), SLOT(configureDeferred())); connect(Net::ProxyConfigurationManager::instance(), SIGNAL(proxyConfigurationChanged()), SLOT(configureDeferred()));
@ -599,16 +594,7 @@ QString Session::torrentExportDirectory() const
void Session::setTorrentExportDirectory(const QString &path) void Session::setTorrentExportDirectory(const QString &path)
{ {
if (path != torrentExportDirectory()) { m_torrentExportDirectory = path;
const bool wasDisabled = torrentExportDirectory().isEmpty();
m_torrentExportDirectory = path;
if (wasDisabled) {
qDebug("Torrent export is enabled, exporting the current torrents");
foreach (TorrentHandle *const torrent, m_torrents)
exportTorrentFile(torrent);
}
}
} }
QString Session::finishedTorrentExportDirectory() const QString Session::finishedTorrentExportDirectory() const