|
|
@ -200,10 +200,16 @@ |
|
|
|
|
|
|
|
|
|
|
|
<fieldset class="settings"> |
|
|
|
<fieldset class="settings"> |
|
|
|
<legend> |
|
|
|
<legend> |
|
|
|
<input type="checkbox" id="autorun_checkbox" onclick="qBittorrent.Preferences.updateAutoRun();" /> |
|
|
|
QBT_TR(Run external program)QBT_TR[CONTEXT=OptionsDialog] |
|
|
|
<label for="autorun_checkbox">QBT_TR(Run external program on torrent completion)QBT_TR[CONTEXT=OptionsDialog]</label> |
|
|
|
|
|
|
|
</legend> |
|
|
|
</legend> |
|
|
|
<div class="formRow"> |
|
|
|
<div class="formRow"> |
|
|
|
|
|
|
|
<input type="checkbox" id="autorunOnTorrentAddedCheckbox" onclick="qBittorrent.Preferences.updateAutoRunOnTorrentAdded();" /> |
|
|
|
|
|
|
|
<label for="autorunOnTorrentAddedCheckbox">QBT_TR(Run external program on torrent added)QBT_TR[CONTEXT=OptionsDialog]</label> |
|
|
|
|
|
|
|
<input type="text" id="autorunOnTorrentAddedProgram" style="width: 400px;" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="formRow"> |
|
|
|
|
|
|
|
<input type="checkbox" id="autorun_checkbox" onclick="qBittorrent.Preferences.updateAutoRun();" /> |
|
|
|
|
|
|
|
<label for="autorun_checkbox">QBT_TR(Run external program on torrent finished)QBT_TR[CONTEXT=OptionsDialog]</label> |
|
|
|
<input type="text" id="autorunProg_txt" style="width: 400px;" /> |
|
|
|
<input type="text" id="autorunProg_txt" style="width: 400px;" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog] |
|
|
|
<div style="font-style: italic;">QBT_TR(Supported parameters (case sensitive):)QBT_TR[CONTEXT=OptionsDialog] |
|
|
@ -1357,6 +1363,7 @@ |
|
|
|
updateMailNotification: updateMailNotification, |
|
|
|
updateMailNotification: updateMailNotification, |
|
|
|
updateMailAuthSettings: updateMailAuthSettings, |
|
|
|
updateMailAuthSettings: updateMailAuthSettings, |
|
|
|
updateAutoRun: updateAutoRun, |
|
|
|
updateAutoRun: updateAutoRun, |
|
|
|
|
|
|
|
updateAutoRunOnTorrentAdded: updateAutoRunOnTorrentAdded, |
|
|
|
generateRandomPort: generateRandomPort, |
|
|
|
generateRandomPort: generateRandomPort, |
|
|
|
updateMaxConnecEnabled: updateMaxConnecEnabled, |
|
|
|
updateMaxConnecEnabled: updateMaxConnecEnabled, |
|
|
|
updateMaxConnecPerTorrentEnabled: updateMaxConnecPerTorrentEnabled, |
|
|
|
updateMaxConnecPerTorrentEnabled: updateMaxConnecPerTorrentEnabled, |
|
|
@ -1485,6 +1492,11 @@ |
|
|
|
$('mail_password_text').setProperty('disabled', !isMailAuthEnabled); |
|
|
|
$('mail_password_text').setProperty('disabled', !isMailAuthEnabled); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const updateAutoRunOnTorrentAdded = function() { |
|
|
|
|
|
|
|
const isAutoRunOnTorrentAddedEnabled = $('autorunOnTorrentAddedCheckbox').getProperty('checked'); |
|
|
|
|
|
|
|
$('autorunOnTorrentAddedProgram').setProperty('disabled', !isAutoRunOnTorrentAddedEnabled); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const updateAutoRun = function() { |
|
|
|
const updateAutoRun = function() { |
|
|
|
const isAutoRunEnabled = $('autorun_checkbox').getProperty('checked'); |
|
|
|
const isAutoRunEnabled = $('autorun_checkbox').getProperty('checked'); |
|
|
|
$('autorunProg_txt').setProperty('disabled', !isAutoRunEnabled); |
|
|
|
$('autorunProg_txt').setProperty('disabled', !isAutoRunEnabled); |
|
|
@ -1788,7 +1800,11 @@ |
|
|
|
updateMailNotification(); |
|
|
|
updateMailNotification(); |
|
|
|
updateMailAuthSettings(); |
|
|
|
updateMailAuthSettings(); |
|
|
|
|
|
|
|
|
|
|
|
// Run an external program on torrent completion |
|
|
|
// Run an external program on torrent added |
|
|
|
|
|
|
|
$('autorunOnTorrentAddedCheckbox').setProperty('checked', pref.autorun_on_torrent_added_enabled); |
|
|
|
|
|
|
|
$('autorunOnTorrentAddedProgram').setProperty('value', pref.autorun_on_torrent_added_program); |
|
|
|
|
|
|
|
updateAutoRunOnTorrentAdded(); |
|
|
|
|
|
|
|
// Run an external program on torrent finished |
|
|
|
$('autorun_checkbox').setProperty('checked', pref.autorun_enabled); |
|
|
|
$('autorun_checkbox').setProperty('checked', pref.autorun_enabled); |
|
|
|
$('autorunProg_txt').setProperty('value', pref.autorun_program); |
|
|
|
$('autorunProg_txt').setProperty('value', pref.autorun_program); |
|
|
|
updateAutoRun(); |
|
|
|
updateAutoRun(); |
|
|
@ -2112,7 +2128,10 @@ |
|
|
|
settings.set('mail_notification_username', $('mail_username_text').getProperty('value')); |
|
|
|
settings.set('mail_notification_username', $('mail_username_text').getProperty('value')); |
|
|
|
settings.set('mail_notification_password', $('mail_password_text').getProperty('value')); |
|
|
|
settings.set('mail_notification_password', $('mail_password_text').getProperty('value')); |
|
|
|
|
|
|
|
|
|
|
|
// Run an external program on torrent completion |
|
|
|
// Run an external program on torrent added |
|
|
|
|
|
|
|
settings.set('autorun_on_torrent_added_enabled', $('autorunOnTorrentAddedCheckbox').getProperty('checked')); |
|
|
|
|
|
|
|
settings.set('autorun_on_torrent_added_program', $('autorunOnTorrentAddedProgram').getProperty('value')); |
|
|
|
|
|
|
|
// Run an external program on torrent finished |
|
|
|
settings.set('autorun_enabled', $('autorun_checkbox').getProperty('checked')); |
|
|
|
settings.set('autorun_enabled', $('autorun_checkbox').getProperty('checked')); |
|
|
|
settings.set('autorun_program', $('autorunProg_txt').getProperty('value')); |
|
|
|
settings.set('autorun_program', $('autorunProg_txt').getProperty('value')); |
|
|
|
|
|
|
|
|
|
|
|