|
|
@ -1964,16 +1964,21 @@ void QBtSession::readAlerts() { |
|
|
|
qDebug("Emitting finishedTorrent() signal"); |
|
|
|
qDebug("Emitting finishedTorrent() signal"); |
|
|
|
emit finishedTorrent(h); |
|
|
|
emit finishedTorrent(h); |
|
|
|
qDebug("Received finished alert for %s", qPrintable(h.name())); |
|
|
|
qDebug("Received finished alert for %s", qPrintable(h.name())); |
|
|
|
|
|
|
|
#ifndef DISABLE_GUI |
|
|
|
bool will_shutdown = (pref.shutdownWhenDownloadsComplete() || |
|
|
|
bool will_shutdown = (pref.shutdownWhenDownloadsComplete() || |
|
|
|
pref.shutdownqBTWhenDownloadsComplete() || |
|
|
|
pref.shutdownqBTWhenDownloadsComplete() || |
|
|
|
pref.suspendWhenDownloadsComplete()) |
|
|
|
pref.suspendWhenDownloadsComplete()) |
|
|
|
&& !hasDownloadingTorrents(); |
|
|
|
&& !hasDownloadingTorrents(); |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
bool will_shutdown = false; |
|
|
|
|
|
|
|
#endif |
|
|
|
// AutoRun program
|
|
|
|
// AutoRun program
|
|
|
|
if(pref.isAutoRunEnabled()) |
|
|
|
if(pref.isAutoRunEnabled()) |
|
|
|
autoRunExternalProgram(h, will_shutdown); |
|
|
|
autoRunExternalProgram(h, will_shutdown); |
|
|
|
// Mail notification
|
|
|
|
// Mail notification
|
|
|
|
if(pref.isMailNotificationEnabled()) |
|
|
|
if(pref.isMailNotificationEnabled()) |
|
|
|
sendNotificationEmail(h); |
|
|
|
sendNotificationEmail(h); |
|
|
|
|
|
|
|
#ifndef DISABLE_GUI |
|
|
|
// Auto-Shutdown
|
|
|
|
// Auto-Shutdown
|
|
|
|
if(will_shutdown) { |
|
|
|
if(will_shutdown) { |
|
|
|
bool suspend = pref.suspendWhenDownloadsComplete(); |
|
|
|
bool suspend = pref.suspendWhenDownloadsComplete(); |
|
|
@ -1997,6 +2002,7 @@ void QBtSession::readAlerts() { |
|
|
|
qApp->exit(); |
|
|
|
qApp->exit(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#endif // DISABLE_GUI
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|