From 56337a0615e0923f73410097b453f63e210ec76c Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 25 Jan 2015 19:58:49 +0800 Subject: [PATCH] Add anime release groups to add new show options page Fix validation of release groups when no group is detected --- CHANGES.md | 3 + gui/slick/css/style.css | 5 ++ gui/slick/interfaces/default/editShow.tmpl | 64 ++----------------- .../interfaces/default/home_newShow.tmpl | 1 + .../default/inc_addShowOptions.tmpl | 3 + .../default/inc_blackwhitelist.tmpl | 5 ++ gui/slick/js/blackwhite.js | 54 ++++++++++++++++ gui/slick/js/newShow.js | 35 +++++++++- sickbeard/blackandwhitelist.py | 27 +++++++- sickbeard/show_queue.py | 13 ++-- sickbeard/webserve.py | 60 ++++++++--------- 11 files changed, 173 insertions(+), 97 deletions(-) create mode 100644 gui/slick/js/blackwhite.js diff --git a/CHANGES.md b/CHANGES.md index 9e80da8c..d0ea2be2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -56,9 +56,12 @@ * Add desktop notifications * Change the AniDB provider image for a sharper looking version * Change to streamline iCal function and make it handle missing network names +* Add anime release groups to add new show options page [develop changelog] * Change uT params from unicode to str.format as magnet URLs worked but sending files in POST bodies failed +* Fix black and white list initialization on new show creation +* Fix validation of release groups when no group is detected ### 0.6.4 (2015-02-10 20:20:00 UTC) diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index a12bce43..d425d5c1 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -949,6 +949,11 @@ div.formpaginate { font-weight: 900 } +#addShowForm #blackwhitelist, +#addShowForm #blackwhitelist h4 { + font-size: 13px; +} + /* ======================================================================= home_addExistingShow.tmpl ========================================================================== */ diff --git a/gui/slick/interfaces/default/editShow.tmpl b/gui/slick/interfaces/default/editShow.tmpl index b6ab17b6..0832e8df 100644 --- a/gui/slick/interfaces/default/editShow.tmpl +++ b/gui/slick/interfaces/default/editShow.tmpl @@ -148,13 +148,11 @@ Separate words with a comma, e.g. "word1,word2,word3"

#if $show.is_anime: -#from sickbeard.blackandwhitelist import * -#include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl") + #from sickbeard.blackandwhitelist import * + #include $os.path.join($sickbeard.PROG_DIR, "gui/slick/interfaces/default/inc_blackwhitelist.tmpl") + #end if - - - @@ -172,21 +170,10 @@ Separate words with a comma, e.g. "word1,word2,word3" }); \$("#exceptions_list").val(all_exceptions); - - var realvalues = []; - - \$('#white option').each(function(i, selected) { - realvalues[i] = \$(selected).val(); - }); - \$("#whitelist").val(realvalues.join(",")); - - realvalues = []; - \$('#black option').each(function(i, selected) { - realvalues[i] = \$(selected).val(); - }); - \$("#blacklist").val(realvalues.join(",")); - - }); + #if $show.is_anime: + generate_bwlist() + #end if + }); \$('#addSceneName').click(function() { var scene_ex = \$('#SceneName').val() @@ -230,43 +217,6 @@ Separate words with a comma, e.g. "word1,word2,word3" \$(this).toggle_SceneException(); - \$('#removeW').click(function() { - return !\$('#white option:selected').remove().appendTo('#pool'); - }); - \$('#addW').click(function() { - return !\$('#pool option:selected').remove().appendTo('#white'); - }); - \$('#addB').click(function() { - return !\$('#pool option:selected').remove().appendTo('#black'); - }); - \$('#removeP').click(function() { - return !\$('#pool option:selected').remove(); - }); - \$('#removeB').click(function() { - return !\$('#black option:selected').remove().appendTo('#pool'); - }); - - \$('#addToWhite').click(function() { - var group = \$('#addToPoolText').attr("value") - if(group == "") - return - \$('#addToPoolText').attr("value", "") - var option = \$("