mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
New: Added test button to SABnzbd.
New: Added test button to Prowl.
This commit is contained in:
parent
5ea626585f
commit
74105974dd
8 changed files with 172 additions and 6 deletions
|
@ -6,6 +6,10 @@ $('#SeparatorStyle').live('change', function () { createExamples(); });
|
|||
$('#NumberStyle').live('change', function () { createExamples(); });
|
||||
$('#MultiEpisodeStyle').live('change', function () { createExamples(); });
|
||||
|
||||
var testProwlUrl = '../Command/TestProwl';
|
||||
var testSabUrl = '../Command/TestSabnzbd';
|
||||
|
||||
|
||||
function createExamples() {
|
||||
createSingleEpisodeExample();
|
||||
createMultiEpisodeExample();
|
||||
|
@ -101,4 +105,32 @@ function createMultiEpisodeExample() {
|
|||
result = result.replace(/\s/g, '.');
|
||||
|
||||
$('#multiEpisodeExample').children('.result').text(result);
|
||||
}
|
||||
|
||||
function testProwl(event) {
|
||||
var apiKeys = $('#ProwlApiKeys').val();
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: testProwlUrl,
|
||||
data: jQuery.param({ apiKeys: apiKeys })
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function testSabnzbd(event) {
|
||||
var host = $('#SabHost').val();
|
||||
var port = $('#SabPort').val();
|
||||
var apiKey = $('#SabApiKey').val();
|
||||
var username = $('#SabUsername').val();
|
||||
var password = $('#SabPassword').val();
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: testSabUrl,
|
||||
data: jQuery.param({ host: host, port: port, apiKey: apiKey, username: username, password: password })
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue