AutoConfigure for SAB is setup, it works for systems with NzbDrone and SABnzbd on the same server only.

This commit is contained in:
Mark McDowall
2011-05-10 23:46:26 -07:00
parent 70bfc49b4e
commit 49a059bdea
7 changed files with 97 additions and 59 deletions
+5 -6
View File
@@ -113,7 +113,7 @@
<fieldset class="sub-field">
<legend>SABnzbd</legend>
@*<button type="button" onclick="autoConfigureSab()">Auto-Configure</button>*@
<button type="button" onclick="autoConfigureSab()">Auto-Configure</button>
<div class="config-section">
<div class="config-group">
@@ -223,9 +223,9 @@
function autoConfigureSab() {
$.ajax({
type: "POST",
type: "GET",
url: autoConfigureSabUrl,
data: jQuery.param({ username: $('#SabUsername').val(), password: $('#SabPassword').val() }),
//data: jQuery.param({ username: $('#SabUsername').val(), password: $('#SabPassword').val() }),
error: function (req, status, error) {
alert("Sorry! We could not autoconfigure SABnzbd for you");
},
@@ -233,10 +233,9 @@
});
function autoConfigureSuccess(data) {
$('#SabApiKey').val(data.ApiKey);
$('#SabHost').val(data.Host);
$('#SabPort').val(data.Port);
$('#SabUsername').val(data.Username);
$('#SabPassword').val(data.Password);
$('#SabApiKey').val(data.ApiKey);
}
}
</script>