Added %n (torrent name) parameter to external program call

This commit is contained in:
Christophe Dumez 2011-03-18 18:28:19 +00:00
commit 53b6a25442
61 changed files with 2000 additions and 1751 deletions

View file

@ -1977,6 +1977,8 @@ void QBtSession::autoRunExternalProgram(const QTorrentHandle &h, bool async) {
else
torrent_path = h.save_path();
program.replace("%f", torrent_path);
// Replace %n by torrent name
program.replace("%n", h.name());
QProcess *process = new QProcess;
if(async) {
connect(process, SIGNAL(finished(int)), this, SLOT(cleanUpAutoRunProcess(int)));