mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-21 20:29:27 +00:00
Updated brink & remix to include api settings
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<p>
|
||||
<h3>HTTP Password:</h3>
|
||||
@@ -51,6 +51,15 @@
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Enable API: <input class="styled" type="checkbox" name="api_enabled" id="api_enabled" value="1" ${config['api_enabled']} /></h3>
|
||||
<div id="apioptions">
|
||||
<br>
|
||||
<h3>API key:<input type="text" name="api_key" id="api_key" value="${config['api_key']}" size="30"><input class="submit" type="button" value="Generate" id="generate_api"></h3><br><br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
@@ -671,6 +680,37 @@
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
if ($("#api_enabled").is(":checked"))
|
||||
{
|
||||
$("#apioptions").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#apioptions").hide();
|
||||
}
|
||||
|
||||
$("#api_enabled").click(function(){
|
||||
if ($("#api_enabled").is(":checked"))
|
||||
{
|
||||
$("#apioptions").show("fast");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#apioptions").hide("fast");
|
||||
}
|
||||
});
|
||||
|
||||
$('#api_key').click(function(){ $('#api_key').select() });
|
||||
$("#generate_api").click(function(){
|
||||
$.get('generateAPI',
|
||||
function(data){
|
||||
if (data.error != undefined) {
|
||||
alert(data.error);
|
||||
return;
|
||||
}
|
||||
$('#api_key').val(data);
|
||||
});
|
||||
});
|
||||
if ($("#encode").is(":checked"))
|
||||
{
|
||||
$("#encoderoptions").show();
|
||||
@@ -679,7 +719,7 @@
|
||||
{
|
||||
$("#encoderoptions").hide();
|
||||
}
|
||||
|
||||
|
||||
$("#encode").click(function(){
|
||||
if ($("#encode").is(":checked"))
|
||||
{
|
||||
@@ -735,5 +775,6 @@
|
||||
handleNewSelection.apply($("#mirror"));
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</%def>
|
||||
|
||||
@@ -48,23 +48,33 @@
|
||||
<td>
|
||||
<h3>Launch Browser on Startup: <input type="checkbox" name="launch_browser" value="1" ${config['launch_browser']} /></h3>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Download Scan Interval (mins):</h3>
|
||||
<input type="text" name="download_scan_interval" value="${config['download_scan_interval']}" size="10" maxlength="40">
|
||||
<h3>Enable API: <input type="checkbox" name="api_enabled" id="api_enabled" value="1" ${config['api_enabled']} /></h3>
|
||||
<div id="apioptions">
|
||||
<br>
|
||||
<h3>API key:<input type="text" name="api_key" id="api_key" value="${config['api_key']}" size="30"><input type="button" value="Generate" id="generate_api"></h3><br><br>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<h3>NZB Search Interval (mins):</h3>
|
||||
<input type="text" name="nzb_search_interval" value="${config['nzb_search_interval']}" size="10" maxlength="40">
|
||||
<h3>NZB Search Interval:</h3>
|
||||
<input type="text" name="nzb_search_interval" value="${config['nzb_search_interval']}" size="4" maxlength="10">mins
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Library Scan Interval (mins):</h3>
|
||||
<input type="text" name="libraryscan_interval" value="${config['libraryscan_interval']}" size="10" maxlength="40">
|
||||
<h3>Download Scan Interval:</h3>
|
||||
<input type="text" name="download_scan_interval" value="${config['download_scan_interval']}" size="4" maxlength="10">mins
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h3>Library Scan Interval:</h3>
|
||||
<input type="text" name="libraryscan_interval" value="${config['libraryscan_interval']}" size="4" maxlength="10">mins
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -516,6 +526,37 @@
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
if ($("#api_enabled").is(":checked"))
|
||||
{
|
||||
$("#apioptions").show();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#apioptions").hide();
|
||||
}
|
||||
|
||||
$("#api_enabled").click(function(){
|
||||
if ($("#api_enabled").is(":checked"))
|
||||
{
|
||||
$("#apioptions").show("fast");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#apioptions").hide("fast");
|
||||
}
|
||||
});
|
||||
|
||||
$('#api_key').click(function(){ $('#api_key').select() });
|
||||
$("#generate_api").click(function(){
|
||||
$.get('generateAPI',
|
||||
function(data){
|
||||
if (data.error != undefined) {
|
||||
alert(data.error);
|
||||
return;
|
||||
}
|
||||
$('#api_key').val(data);
|
||||
});
|
||||
});
|
||||
if ($("#encode").is(":checked"))
|
||||
{
|
||||
$("#encoderoptions").show();
|
||||
|
||||
Reference in New Issue
Block a user