mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 21:14:33 +00:00
Add log messages
This commit is contained in:
parent
fd996f15f0
commit
def27bce4d
@ -264,6 +264,7 @@ void Application::sendNotificationEmail(BitTorrent::TorrentHandle *const torrent
|
|||||||
void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
|
void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
|
||||||
{
|
{
|
||||||
Preferences *const pref = Preferences::instance();
|
Preferences *const pref = Preferences::instance();
|
||||||
|
Logger *logger = Logger::instance();
|
||||||
|
|
||||||
// AutoRun program
|
// AutoRun program
|
||||||
if (pref->isAutoRunEnabled()) {
|
if (pref->isAutoRunEnabled()) {
|
||||||
@ -279,12 +280,15 @@ void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
|
|||||||
program.replace("%T", torrent->currentTracker());
|
program.replace("%T", torrent->currentTracker());
|
||||||
program.replace("%I", torrent->hash());
|
program.replace("%I", torrent->hash());
|
||||||
|
|
||||||
|
logger->addMessage(tr("Torrent: %1, running external program: %2").arg(torrent->name()).arg(program));
|
||||||
QProcess::startDetached(program);
|
QProcess::startDetached(program);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mail notification
|
// Mail notification
|
||||||
if (pref->isMailNotificationEnabled())
|
if (pref->isMailNotificationEnabled()) {
|
||||||
|
logger->addMessage(tr("Torrent: %1, sending mail notification").arg(torrent->name()));
|
||||||
sendNotificationEmail(torrent);
|
sendNotificationEmail(torrent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::allTorrentsFinished()
|
void Application::allTorrentsFinished()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user