|
|
|
@ -2048,7 +2048,6 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
@@ -2048,7 +2048,6 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// Move to download directory if necessary
|
|
|
|
|
if(!defaultTempPath.isEmpty()) { |
|
|
|
|
// Check if directory is different
|
|
|
|
@ -2057,6 +2056,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
@@ -2057,6 +2056,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|
|
|
|
if(current_dir != save_dir) { |
|
|
|
|
h.move_storage(save_dir.absolutePath()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// Remember finished state
|
|
|
|
|
TorrentPersistentData::saveSeedStatus(h); |
|
|
|
|
// Recheck if the user asked to
|
|
|
|
@ -2065,7 +2065,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
@@ -2065,7 +2065,8 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|
|
|
|
} |
|
|
|
|
emit finishedTorrent(h); |
|
|
|
|
qDebug("Received finished alert for %s", qPrintable(h.name())); |
|
|
|
|
bool will_shutdown = Preferences::shutdownWhenDownloadsComplete() && !hasDownloadingTorrents(); |
|
|
|
|
bool will_shutdown = (Preferences::shutdownWhenDownloadsComplete() || Preferences::shutdownqBTWhenDownloadsComplete()) |
|
|
|
|
&& !hasDownloadingTorrents(); |
|
|
|
|
// AutoRun program
|
|
|
|
|
if(Preferences::isAutoRunEnabled()) |
|
|
|
|
autoRunExternalProgram(h, will_shutdown); |
|
|
|
@ -2074,6 +2075,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
@@ -2074,6 +2075,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|
|
|
|
sendNotificationEmail(h); |
|
|
|
|
// Auto-Shutdown
|
|
|
|
|
if(will_shutdown) { |
|
|
|
|
if(Preferences::shutdownWhenDownloadsComplete()) { |
|
|
|
|
qDebug("Preparing for auto-shutdown because all downloads are complete!"); |
|
|
|
|
#if LIBTORRENT_VERSION_MINOR < 15 |
|
|
|
|
saveDHTEntry(); |
|
|
|
@ -2084,6 +2086,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
@@ -2084,6 +2086,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|
|
|
|
saveFastResumeData(); |
|
|
|
|
qDebug("Sending computer shutdown signal"); |
|
|
|
|
misc::shutdownComputer(); |
|
|
|
|
} |
|
|
|
|
qDebug("Exiting the application"); |
|
|
|
|
qApp->exit(); |
|
|
|
|
return; |
|
|
|
|