diff --git a/CHANGES.md b/CHANGES.md index 65e29848..89aee824 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,7 +26,7 @@ * Fix Layout "Poster" sort of Paused, Ended, and Continuing shows as they were random * Fix Layout "Simple" sort of tvrage "New" and "Returning" series by changing status column text to "Continuing" * Add dark spinner to "Add New Show" (searching indexers), "Add existing shows" (Loading Folders), Coming Eps and all config pages (when saving) - +* Overhaul Config Search Settings in line with General Configuration ### 0.2.1 (2014-10-22 06:41:00 UTC) diff --git a/gui/slick/interfaces/default/config_search.tmpl b/gui/slick/interfaces/default/config_search.tmpl index 8e784986..a0230412 100755 --- a/gui/slick/interfaces/default/config_search.tmpl +++ b/gui/slick/interfaces/default/config_search.tmpl @@ -1,595 +1,526 @@ #import sickbeard #from sickbeard import clients -#set global $title="Config - Episode Search" -#set global $header="Search Options" +#set global $title = 'Config - Episode Search' +#set global $header = 'Search Settings' -#set global $sbPath="../.." +#set global $sbPath = '../..' -#set global $topmenu="config"# +#set global $topmenu = 'config' #import os.path -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_top.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl') -#if $varExists('header') +#if $varExists('header')

$header

-#else +#else

$title

#end if +#set $html_selected = ' selected="selected"' +#set $html_checked = 'checked="checked" ' +
-
- - - -
+
+ -
-

Episode Search

-

Settings that dictate how and when episode searching works with Providers.

-
-
-
- - -
+
-
-
- -
-
+
+

Episode Search

+

How to manage searching with providers.

+
+
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - - -
- -
- - - -
- -
- - -
-
- - -
-
- - -
- - - -
-
- -
- -
-

NZB Search

-

Settings that dictate how SickRage handles NZB search results.

-
- -
- -
- - -
- -
-
- -
- -
-
- - -
-
- -
-
- - - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
- -
-
- - - - -
- -
- - - -
- -
- - -
- -
- - -
- -
- - -
- - #if $sickbeard.NZBGET_PRIORITY == -100: - #set $prio_verylow = 'selected="selected"' - #set $prio_low = '' - #set $prio_normal = '' - #set $prio_high = '' - #set $prio_veryhigh = '' - #set $prio_force = '' - #elif $sickbeard.NZBGET_PRIORITY == -50: - #set $prio_verylow = '' - #set $prio_low = 'selected="selected"' - #set $prio_normal = '' - #set $prio_high = '' - #set $prio_veryhigh = '' - #set $prio_force = '' - #elif $sickbeard.NZBGET_PRIORITY == 0: - #set $prio_verylow = '' - #set $prio_low = '' - #set $prio_normal = 'selected="selected"' - #set $prio_high = '' - #set $prio_veryhigh = '' - #set $prio_force = '' - #elif $sickbeard.NZBGET_PRIORITY == 50: - #set $prio_verylow = '' - #set $prio_low = '' - #set $prio_normal = '' - #set $prio_high = 'selected="selected"' - #set $prio_veryhigh = '' - #set $prio_force = '' - #elif $sickbeard.NZBGET_PRIORITY == 100: - #set $prio_verylow = '' - #set $prio_low = '' - #set $prio_normal = '' - #set $prio_high = '' - #set $prio_veryhigh = 'selected="selected"' - #set $prio_force = '' - #elif $sickbeard.NZBGET_PRIORITY == 900: - #set $prio_verylow = '' - #set $prio_low = '' - #set $prio_normal = '' - #set $prio_high = '' - #set $prio_veryhigh = '' - #set $prio_force = 'selected="selected"' - #else: - #set $prio_verylow = '' - #set $prio_low = '' - #set $prio_normal = 'selected="selected"' - #set $prio_high = '' - #set $prio_veryhigh = '' - #set $prio_force = '' - #end if - + +
+
- -
- -
- -
Click below to test.
- -
- -
- -
-
-
+
+ +
-
-

Torrent Search

-

Settings that dictate how SickRage handles Torrent search results.

-
+
+ +
-
+
+ +
-
- - -
+
+ +
-
-
- - -
-
- - -
+
+ +
-
-
-
-
- -
-
- - - -
- -
- - -
- -
- - -
+
+ +
-
- - -
- -
- - - -
+
+ +
-
- - - -
+
+ +
-
- - -
+
+ +
-
- -
+ -
- -
+
+
-
Click below to test.
- -
-
-
- -
- -
+
+ +
+

NZB Search

+

How to handle NZB search results.

+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +#set $prio_verylow = '' +#set $prio_low = '' +#set $prio_normal = '' +#set $prio_high = '' +#set $prio_veryhigh = '' +#set $prio_force = '' +#if -100 == $sickbeard.NZBGET_PRIORITY: + #set $prio_verylow = $html_selected +#elif -50 == $sickbeard.NZBGET_PRIORITY: + #set $prio_low = $html_selected +#elif 0 == $sickbeard.NZBGET_PRIORITY: + #set $prio_normal = $html_selected +#elif 50 == $sickbeard.NZBGET_PRIORITY: + #set $prio_high = $html_selected +#elif 100 == $sickbeard.NZBGET_PRIORITY: + #set $prio_veryhigh = $html_selected +#elif 900 == $sickbeard.NZBGET_PRIORITY: + #set $prio_force = $html_selected +#else: + #set $prio_normal = $html_selected +#end if +
+ +
+
+ +
Click below to test
+ +
+ +
+ +
+
+ +
+ +
+

Torrent Search

+

How to handle Torrent search results.

+
+ +
+ +
+ + +
+ +
+
+ + +
+
+ +
+ +
+
+
+
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
Click below to test
+ +
+
+
+
+
+ +
All non-absolute folder locations are relative to $sickbeard.DATA_DIR
- -
+ +
@@ -599,13 +530,12 @@ -#include $os.path.join($sickbeard.PROG_DIR,"gui/slick/interfaces/default/inc_bottom.tmpl") +#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl') diff --git a/gui/slick/js/configSearch.js b/gui/slick/js/configSearch.js index 7f3839c7..ecf7cccf 100644 --- a/gui/slick/js/configSearch.js +++ b/gui/slick/js/configSearch.js @@ -1,126 +1,113 @@ $(document).ready(function(){ - var loading = ''; - - function toggle_torrent_title(){ - if ($('#use_torrents').prop('checked')) - $('#no-torrents').show(); - else - $('#no-torrents').hide(); - } - + var loading = ''; + + function toggle_torrent_title(){ + if ($('#use_torrents').prop('checked')) + $('#no_torrents').show(); + else + $('#no_torrents').hide(); + } + $.fn.nzb_method_handler = function() { - - var selectedProvider = $('#nzb_method :selected').val(); - if (selectedProvider == "blackhole") { - $('#blackhole_settings').show(); - $('#sabnzbd_settings').hide(); - $('#testSABnzbd').hide(); - $('#testSABnzbd-result').hide(); - $('#nzbget_settings').hide(); - } else if (selectedProvider == "nzbget") { - $('#blackhole_settings').hide(); - $('#sabnzbd_settings').hide(); - $('#testSABnzbd').hide(); - $('#testSABnzbd-result').hide(); - $('#nzbget_settings').show(); + var selectedProvider = $('#nzb_method :selected').val(), + blackhole_settings = '#blackhole_settings', + sabnzbd_settings = '#sabnzbd_settings', + testSABnzbd = '#testSABnzbd', + testSABnzbd_result = '#testSABnzbd_result', + nzbget_settings = '#nzbget_settings'; + + $(blackhole_settings).hide(); + $(sabnzbd_settings).hide(); + $(testSABnzbd).hide(); + $(testSABnzbd_result).hide(); + $(nzbget_settings).hide(); + + if ('blackhole' == selectedProvider) { + $(blackhole_settings).show(); + } else if ('nzbget' == selectedProvider) { + $(nzbget_settings).show(); } else { - $('#blackhole_settings').hide(); - $('#sabnzbd_settings').show(); - $('#testSABnzbd').show(); - $('#testSABnzbd-result').show(); - $('#nzbget_settings').hide(); + $(sabnzbd_settings).show(); + $(testSABnzbd).show(); + $(testSABnzbd_result).show(); } - } $.fn.torrent_method_handler = function() { - - var selectedProvider = $('#torrent_method :selected').val(); - - if (selectedProvider == "blackhole") { - $('#t_blackhole_settings').show(); - $('#torrent_settings').hide(); - } else if (selectedProvider == "utorrent") { - $('#t_blackhole_settings').hide(); - $('#torrent_settings').show(); - $('#Torrent_Verify_Cert').hide(); - $('#Torrent_username').show(); - $('#Torrent_Path').hide(); - $('#Torrent_Ratio').show(); - $('#Torrent_Seed_Time').show(); - $('#Torrent_High_Bandwidth').hide(); - $('#Torrent_Label').show(); - $('#label_warning').text(''); - $('#host_desc').text('uTorrent Host'); - $('#username_desc').text('uTorrent Username'); - $('#password_desc').text('uTorrent Password'); - $('#label_desc').text('uTorrent Label'); - } else if (selectedProvider == "transmission"){ - $('#t_blackhole_settings').hide(); - $('#torrent_settings').show(); - $('#Torrent_Verify_Cert').hide(); - $('#Torrent_username').show(); - $('#Torrent_Path').show(); - $('#Torrent_Ratio').show(); - $('#Torrent_Seed_Time').show(); - $('#Torrent_High_Bandwidth').show(); - $('#Torrent_Label').hide(); - $('#host_desc').html('Transmission Host'); - $('#username_desc').text('Transmission Username'); - $('#password_desc').text('Transmission Password'); - $('#directory_desc').text('Transmission Directory'); - } else if (selectedProvider == "deluge"){ - $('#t_blackhole_settings').hide(); - $('#torrent_settings').show(); - $('#Torrent_Verify_Cert').show(); - $('#Torrent_Label').show(); - $('#Torrent_username').show(); - $('#Torrent_Path').show(); - $('#Torrent_Ratio').show(); - $('#Torrent_Seed_Time').hide(); - $('#Torrent_High_Bandwidth').hide(); - $('#host_desc').text('Deluge Host'); - $('#username_desc').text('Deluge Username'); - $('#password_desc').text('Deluge Password'); - $('#label_desc').text('Deluge Label'); - $('#label_warning').text('Note: Label plugin must be enabled in Deluge client. No blank spaces are allowed in label name'); - $('#directory_desc').text('Deluge Directory'); - } else if (selectedProvider == "download_station"){ - $('#t_blackhole_settings').hide(); - $('#torrent_settings').show(); - $('#Torrent_Verify_Cert').hide(); - $('#Torrent_Label').hide(); - $('#Torrent_username').show(); - $('#Torrent_Paused').hide(); - $('#Torrent_Path').show(); - $('#Torrent_Ratio').hide(); - $('#Torrent_Seed_Time').hide(); - $('#Torrent_High_Bandwidth').hide(); - $('#host_desc').text('Synology Host'); - $('#username_desc').text('Synology Username'); - $('#password_desc').text('Synology Password'); - $('#label_desc').text('Synology Label'); - $('#directory_desc').text('Synology Directory'); - $('#Torrent_Path').find('.fileBrowser').hide(); - } else if (selectedProvider == "rtorrent"){ - $('#t_blackhole_settings').hide(); - $('#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'); + + $('#options_torrent_clients').hide(); + $('#options_torrent_blackhole').hide(); + + var selectedProvider = $('#torrent_method :selected').val(), + host = ' host:port', + username = ' username', + password = ' password', + label = ' label', + directory = ' directory', + client = '', + option_panel = '#options_torrent_blackhole'; + + if ('blackhole' != selectedProvider) { + var label_warning_deluge = '#label_warning_deluge', + host_desc_rtorrent = '#host_desc_rtorrent', + host_desc_torrent = '#host_desc_torrent', + torrent_verify_cert_option = '#torrent_verify_cert_option', + torrent_path_option = '#torrent_path_option', + torrent_seed_time_option = '#torrent_seed_time_option', + torrent_high_bandwidth_option = '#torrent_high_bandwidth_option', + torrent_label_option = '#torrent_label_option', + path_synology = '#path_synology', + torrent_paused_option = '#torrent_paused_option'; + + $(label_warning_deluge).hide(); + $(host_desc_rtorrent).hide(); + $(host_desc_torrent).show(); + $(torrent_verify_cert_option).hide(); + $(torrent_path_option).show(); + $(torrent_path_option).find('.fileBrowser').show(); + $(torrent_seed_time_option).hide(); + $(torrent_high_bandwidth_option).hide(); + $(torrent_label_option).show(); + $(path_synology).hide(); + $(torrent_paused_option).show(); + + if ('utorrent' == selectedProvider) { + client = 'uTorrent'; + $(torrent_path_option).hide(); + $(torrent_seed_time_option).show(); + } else if ('transmission' == selectedProvider){ + client = 'Transmission'; + $(torrent_seed_time_option).show(); + $(torrent_high_bandwidth_option).show(); + $(torrent_label_option).hide(); + //$('#directory_title').text(client + directory); + } else if ('deluge' == selectedProvider){ + client = 'Deluge'; + $(torrent_verify_cert_option).show(); + $(label_warning_deluge).show(); + //$('#directory_title').text(client + directory); + } else if ('download_station' == selectedProvider){ + client = 'Synology DS'; + $(torrent_label_option).hide(); + $('#torrent_paused_option').hide(); + $(torrent_path_option).find('.fileBrowser').hide(); + //$('#directory_title').text(client + directory); + $(path_synology).show(); + } else if ('rtorrent' == selectedProvider){ + client = 'rTorrent'; + $(host_desc_torrent).hide(); + $(host_desc_rtorrent).show(); + $(torrent_paused_option).hide(); + //$('#directory_title').text(client + directory); + } + $('#host_title').text(client + host); + $('#username_title').text(client + username); + $('#password_title').text(client + password); + $('#torrent_client').text(client); + option_panel = '#options_torrent_clients'; } + $(option_panel).show(); } $('#nzb_method').change($(this).nzb_method_handler); @@ -128,34 +115,34 @@ $(document).ready(function(){ $(this).nzb_method_handler(); $('#testSABnzbd').click(function(){ - $('#testSABnzbd-result').html(loading); + $('#testSABnzbd_result').html(loading); var sab_host = $('#sab_host').val(); var sab_username = $('#sab_username').val(); var sab_password = $('#sab_password').val(); var sab_apiKey = $('#sab_apikey').val(); - - $.get(sbRoot+"/home/testSABnzbd", {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey}, - function (data){ $('#testSABnzbd-result').html(data); }); + + $.get(sbRoot + '/home/testSABnzbd', {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey}, + function (data){ $('#testSABnzbd_result').html(data); }); }); - + $('#torrent_method').change($(this).torrent_method_handler); - - $(this).torrent_method_handler(); - + + $(this).torrent_method_handler(); + $('#use_torrents').click(function(){ - toggle_torrent_title(); + toggle_torrent_title(); }); - $('#testTorrent').click(function(){ - $('#testTorrent-result').html(loading); - var torrent_method = $('#torrent_method :selected').val(); + $('#test_torrent').click(function(){ + $('#test_torrent_result').html(loading); + var torrent_method = $('#torrent_method :selected').val(); var torrent_host = $('#torrent_host').val(); var torrent_username = $('#torrent_username').val(); var torrent_password = $('#torrent_password').val(); - - $.get(sbRoot+"/home/testTorrent", {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password}, - function (data){ $('#testTorrent-result').html(data); }); + + $.get(sbRoot + '/home/testTorrent', {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password}, + function (data){ $('#test_torrent_result').html(data); }); }); });