mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Merge branch 'feature/OverhaulSearchSettings' of https://github.com/JackDandy/SickRage into develop
This commit is contained in:
commit
a38a9de8cb
@ -33,6 +33,7 @@
|
|||||||
* Styled config_providers to match new config_general styling
|
* Styled config_providers to match new config_general styling
|
||||||
* Removed qtip from providers and converted back to a tab
|
* Removed qtip from providers and converted back to a tab
|
||||||
* Removed superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI
|
* Removed superfish-1.4.8.js and supersubs-0.2b.js as they no longer break provider sorting with qtip removed and is no longer required due to new UI
|
||||||
|
* Overhaul Config Search Settings in line with General Configuration
|
||||||
|
|
||||||
|
|
||||||
### 0.2.1 (2014-10-22 06:41:00 UTC)
|
### 0.2.1 (2014-10-22 06:41:00 UTC)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,126 +1,113 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
var loading = '<img src="'+sbRoot+'/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
|
var loading = '<img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
|
||||||
|
|
||||||
function toggle_torrent_title(){
|
function toggle_torrent_title(){
|
||||||
if ($('#use_torrents').prop('checked'))
|
if ($('#use_torrents').prop('checked'))
|
||||||
$('#no-torrents').show();
|
$('#no_torrents').show();
|
||||||
else
|
else
|
||||||
$('#no-torrents').hide();
|
$('#no_torrents').hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
$.fn.nzb_method_handler = function() {
|
$.fn.nzb_method_handler = function() {
|
||||||
|
|
||||||
var selectedProvider = $('#nzb_method :selected').val();
|
var selectedProvider = $('#nzb_method :selected').val(),
|
||||||
|
blackhole_settings = '#blackhole_settings',
|
||||||
|
sabnzbd_settings = '#sabnzbd_settings',
|
||||||
|
testSABnzbd = '#testSABnzbd',
|
||||||
|
testSABnzbd_result = '#testSABnzbd_result',
|
||||||
|
nzbget_settings = '#nzbget_settings';
|
||||||
|
|
||||||
if (selectedProvider == "blackhole") {
|
$(blackhole_settings).hide();
|
||||||
$('#blackhole_settings').show();
|
$(sabnzbd_settings).hide();
|
||||||
$('#sabnzbd_settings').hide();
|
$(testSABnzbd).hide();
|
||||||
$('#testSABnzbd').hide();
|
$(testSABnzbd_result).hide();
|
||||||
$('#testSABnzbd-result').hide();
|
$(nzbget_settings).hide();
|
||||||
$('#nzbget_settings').hide();
|
|
||||||
} else if (selectedProvider == "nzbget") {
|
if ('blackhole' == selectedProvider) {
|
||||||
$('#blackhole_settings').hide();
|
$(blackhole_settings).show();
|
||||||
$('#sabnzbd_settings').hide();
|
} else if ('nzbget' == selectedProvider) {
|
||||||
$('#testSABnzbd').hide();
|
$(nzbget_settings).show();
|
||||||
$('#testSABnzbd-result').hide();
|
|
||||||
$('#nzbget_settings').show();
|
|
||||||
} else {
|
} else {
|
||||||
$('#blackhole_settings').hide();
|
$(sabnzbd_settings).show();
|
||||||
$('#sabnzbd_settings').show();
|
$(testSABnzbd).show();
|
||||||
$('#testSABnzbd').show();
|
$(testSABnzbd_result).show();
|
||||||
$('#testSABnzbd-result').show();
|
|
||||||
$('#nzbget_settings').hide();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$.fn.torrent_method_handler = function() {
|
$.fn.torrent_method_handler = function() {
|
||||||
|
|
||||||
var selectedProvider = $('#torrent_method :selected').val();
|
$('#options_torrent_clients').hide();
|
||||||
|
$('#options_torrent_blackhole').hide();
|
||||||
|
|
||||||
if (selectedProvider == "blackhole") {
|
var selectedProvider = $('#torrent_method :selected').val(),
|
||||||
$('#t_blackhole_settings').show();
|
host = ' host:port',
|
||||||
$('#torrent_settings').hide();
|
username = ' username',
|
||||||
} else if (selectedProvider == "utorrent") {
|
password = ' password',
|
||||||
$('#t_blackhole_settings').hide();
|
label = ' label',
|
||||||
$('#torrent_settings').show();
|
directory = ' directory',
|
||||||
$('#Torrent_Verify_Cert').hide();
|
client = '',
|
||||||
$('#Torrent_username').show();
|
option_panel = '#options_torrent_blackhole';
|
||||||
$('#Torrent_Path').hide();
|
|
||||||
$('#Torrent_Ratio').show();
|
if ('blackhole' != selectedProvider) {
|
||||||
$('#Torrent_Seed_Time').show();
|
var label_warning_deluge = '#label_warning_deluge',
|
||||||
$('#Torrent_High_Bandwidth').hide();
|
host_desc_rtorrent = '#host_desc_rtorrent',
|
||||||
$('#Torrent_Label').show();
|
host_desc_torrent = '#host_desc_torrent',
|
||||||
$('#label_warning').text('');
|
torrent_verify_cert_option = '#torrent_verify_cert_option',
|
||||||
$('#host_desc').text('uTorrent Host');
|
torrent_path_option = '#torrent_path_option',
|
||||||
$('#username_desc').text('uTorrent Username');
|
torrent_seed_time_option = '#torrent_seed_time_option',
|
||||||
$('#password_desc').text('uTorrent Password');
|
torrent_high_bandwidth_option = '#torrent_high_bandwidth_option',
|
||||||
$('#label_desc').text('uTorrent Label');
|
torrent_label_option = '#torrent_label_option',
|
||||||
} else if (selectedProvider == "transmission"){
|
path_synology = '#path_synology',
|
||||||
$('#t_blackhole_settings').hide();
|
torrent_paused_option = '#torrent_paused_option';
|
||||||
$('#torrent_settings').show();
|
|
||||||
$('#Torrent_Verify_Cert').hide();
|
$(label_warning_deluge).hide();
|
||||||
$('#Torrent_username').show();
|
$(host_desc_rtorrent).hide();
|
||||||
$('#Torrent_Path').show();
|
$(host_desc_torrent).show();
|
||||||
$('#Torrent_Ratio').show();
|
$(torrent_verify_cert_option).hide();
|
||||||
$('#Torrent_Seed_Time').show();
|
$(torrent_path_option).show();
|
||||||
$('#Torrent_High_Bandwidth').show();
|
$(torrent_path_option).find('.fileBrowser').show();
|
||||||
$('#Torrent_Label').hide();
|
$(torrent_seed_time_option).hide();
|
||||||
$('#host_desc').html('Transmission Host');
|
$(torrent_high_bandwidth_option).hide();
|
||||||
$('#username_desc').text('Transmission Username');
|
$(torrent_label_option).show();
|
||||||
$('#password_desc').text('Transmission Password');
|
$(path_synology).hide();
|
||||||
$('#directory_desc').text('Transmission Directory');
|
$(torrent_paused_option).show();
|
||||||
} else if (selectedProvider == "deluge"){
|
|
||||||
$('#t_blackhole_settings').hide();
|
if ('utorrent' == selectedProvider) {
|
||||||
$('#torrent_settings').show();
|
client = 'uTorrent';
|
||||||
$('#Torrent_Verify_Cert').show();
|
$(torrent_path_option).hide();
|
||||||
$('#Torrent_Label').show();
|
$(torrent_seed_time_option).show();
|
||||||
$('#Torrent_username').show();
|
} else if ('transmission' == selectedProvider){
|
||||||
$('#Torrent_Path').show();
|
client = 'Transmission';
|
||||||
$('#Torrent_Ratio').show();
|
$(torrent_seed_time_option).show();
|
||||||
$('#Torrent_Seed_Time').hide();
|
$(torrent_high_bandwidth_option).show();
|
||||||
$('#Torrent_High_Bandwidth').hide();
|
$(torrent_label_option).hide();
|
||||||
$('#host_desc').text('Deluge Host');
|
//$('#directory_title').text(client + directory);
|
||||||
$('#username_desc').text('Deluge Username');
|
} else if ('deluge' == selectedProvider){
|
||||||
$('#password_desc').text('Deluge Password');
|
client = 'Deluge';
|
||||||
$('#label_desc').text('Deluge Label');
|
$(torrent_verify_cert_option).show();
|
||||||
$('#label_warning').text('Note: Label plugin must be enabled in Deluge client. No blank spaces are allowed in label name');
|
$(label_warning_deluge).show();
|
||||||
$('#directory_desc').text('Deluge Directory');
|
//$('#directory_title').text(client + directory);
|
||||||
} else if (selectedProvider == "download_station"){
|
} else if ('download_station' == selectedProvider){
|
||||||
$('#t_blackhole_settings').hide();
|
client = 'Synology DS';
|
||||||
$('#torrent_settings').show();
|
$(torrent_label_option).hide();
|
||||||
$('#Torrent_Verify_Cert').hide();
|
$('#torrent_paused_option').hide();
|
||||||
$('#Torrent_Label').hide();
|
$(torrent_path_option).find('.fileBrowser').hide();
|
||||||
$('#Torrent_username').show();
|
//$('#directory_title').text(client + directory);
|
||||||
$('#Torrent_Paused').hide();
|
$(path_synology).show();
|
||||||
$('#Torrent_Path').show();
|
} else if ('rtorrent' == selectedProvider){
|
||||||
$('#Torrent_Ratio').hide();
|
client = 'rTorrent';
|
||||||
$('#Torrent_Seed_Time').hide();
|
$(host_desc_torrent).hide();
|
||||||
$('#Torrent_High_Bandwidth').hide();
|
$(host_desc_rtorrent).show();
|
||||||
$('#host_desc').text('Synology Host');
|
$(torrent_paused_option).hide();
|
||||||
$('#username_desc').text('Synology Username');
|
//$('#directory_title').text(client + directory);
|
||||||
$('#password_desc').text('Synology Password');
|
}
|
||||||
$('#label_desc').text('Synology Label');
|
$('#host_title').text(client + host);
|
||||||
$('#directory_desc').text('Synology Directory');
|
$('#username_title').text(client + username);
|
||||||
$('#Torrent_Path').find('.fileBrowser').hide();
|
$('#password_title').text(client + password);
|
||||||
} else if (selectedProvider == "rtorrent"){
|
$('#torrent_client').text(client);
|
||||||
$('#t_blackhole_settings').hide();
|
option_panel = '#options_torrent_clients';
|
||||||
$('#torrent_settings').show();
|
|
||||||
$('#Torrent_Verify_Cert').hide();
|
|
||||||
$('#Torrent_Label').show();
|
|
||||||
$('#Torrent_username').show();
|
|
||||||
$('#Torrent_Paused').hide();
|
|
||||||
$('#Torrent_Path').show();
|
|
||||||
$('#Torrent_Ratio').hide();
|
|
||||||
$('#Torrent_Seed_Time').hide();
|
|
||||||
$('#Torrent_High_Bandwidth').hide();
|
|
||||||
$('#host_desc').text('rTorrent Host');
|
|
||||||
$('#username_desc').text('rTorrent Username');
|
|
||||||
$('#password_desc').text('rTorrent Password');
|
|
||||||
$('#label_desc').text('rTorrent Label');
|
|
||||||
$('#label_warning').text('');
|
|
||||||
$('#directory_desc').text('rTorrent Directory');
|
|
||||||
}
|
}
|
||||||
|
$(option_panel).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#nzb_method').change($(this).nzb_method_handler);
|
$('#nzb_method').change($(this).nzb_method_handler);
|
||||||
@ -128,34 +115,34 @@ $(document).ready(function(){
|
|||||||
$(this).nzb_method_handler();
|
$(this).nzb_method_handler();
|
||||||
|
|
||||||
$('#testSABnzbd').click(function(){
|
$('#testSABnzbd').click(function(){
|
||||||
$('#testSABnzbd-result').html(loading);
|
$('#testSABnzbd_result').html(loading);
|
||||||
var sab_host = $('#sab_host').val();
|
var sab_host = $('#sab_host').val();
|
||||||
var sab_username = $('#sab_username').val();
|
var sab_username = $('#sab_username').val();
|
||||||
var sab_password = $('#sab_password').val();
|
var sab_password = $('#sab_password').val();
|
||||||
var sab_apiKey = $('#sab_apikey').val();
|
var sab_apiKey = $('#sab_apikey').val();
|
||||||
|
|
||||||
$.get(sbRoot+"/home/testSABnzbd", {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey},
|
$.get(sbRoot + '/home/testSABnzbd', {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey},
|
||||||
function (data){ $('#testSABnzbd-result').html(data); });
|
function (data){ $('#testSABnzbd_result').html(data); });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#torrent_method').change($(this).torrent_method_handler);
|
$('#torrent_method').change($(this).torrent_method_handler);
|
||||||
|
|
||||||
$(this).torrent_method_handler();
|
$(this).torrent_method_handler();
|
||||||
|
|
||||||
$('#use_torrents').click(function(){
|
$('#use_torrents').click(function(){
|
||||||
toggle_torrent_title();
|
toggle_torrent_title();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#testTorrent').click(function(){
|
$('#test_torrent').click(function(){
|
||||||
$('#testTorrent-result').html(loading);
|
$('#test_torrent_result').html(loading);
|
||||||
var torrent_method = $('#torrent_method :selected').val();
|
var torrent_method = $('#torrent_method :selected').val();
|
||||||
var torrent_host = $('#torrent_host').val();
|
var torrent_host = $('#torrent_host').val();
|
||||||
var torrent_username = $('#torrent_username').val();
|
var torrent_username = $('#torrent_username').val();
|
||||||
var torrent_password = $('#torrent_password').val();
|
var torrent_password = $('#torrent_password').val();
|
||||||
|
|
||||||
$.get(sbRoot+"/home/testTorrent", {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password},
|
$.get(sbRoot + '/home/testTorrent', {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password},
|
||||||
function (data){ $('#testTorrent-result').html(data); });
|
function (data){ $('#test_torrent_result').html(data); });
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user