Merge pull request #478 from adam111316/feature/FixShowSplitDefaults

Fix saving default show list group on add new show options page
This commit is contained in:
adam111316 2015-08-11 06:11:05 +08:00
commit 8eee9d8699
5 changed files with 10 additions and 19 deletions

View file

@ -3,6 +3,8 @@
* Change to only refresh scene exception data for shows that need it
* Fix small cosmetic issue to correctly display "full backlog" date
* Add search crawler exclusions
* Fix saving default show list group on add new show options page
* Remove legacy anime split home option from anime settings tab (new option located in general/interface tab)
### 0.10.0 (2015-08-06 11:05:00 UTC)

View file

@ -36,16 +36,6 @@
</div>
<fieldset class="component-group-list">
<div class="field-pair">
<label for="split_home">
<span class="component-title">Split show lists</span>
<span class="component-desc">
<input type="checkbox" class="enabler" name="split_home" id="split_home" #if $sickbeard.ANIME_SPLIT_HOME then 'checked="checked"' else ""# />
<p>separate anime from other shows on the home page</p>
</span>
</label>
</div>
<div class="field-pair">
<label for="anime_treat_as_hdtv">
<span class="component-title">Quality control</span>

View file

@ -19,7 +19,8 @@ $(document).ready(function(){
default_flatten_folders: $('#flatten_folders').prop('checked'),
default_scene: $('#scene').prop('checked'),
default_subtitles: $('#subtitles').prop('checked'),
default_anime: $('#anime').prop('checked')
default_anime: $('#anime').prop('checked'),
default_tag: $('#tag').val()
});
new PNotify({
@ -32,7 +33,7 @@ $(document).ready(function(){
});
$('#statusSelect, #qualityPreset, #anyQualities, #bestQualities, #wanted_begin, #wanted_latest,'
+ ' #flatten_folders, #scene, #subtitles, #anime').change(function() {
+ ' #flatten_folders, #scene, #subtitles, #anime, #tag').change(function() {
$('#saveDefaultsButton').attr('disabled', false);
});

View file

@ -365,7 +365,6 @@ ANIDB_USERNAME = None
ANIDB_PASSWORD = None
ANIDB_USE_MYLIST = False
ADBA_CONNECTION = None
ANIME_SPLIT_HOME = False
ANIME_TREAT_AS_HDTV = False
USE_SYNOINDEX = False
@ -530,7 +529,7 @@ def initialize(consoleLogging=True):
USE_FAILED_DOWNLOADS, DELETE_FAILED, ANON_REDIRECT, LOCALHOST_IP, TMDB_API_KEY, DEBUG, PROXY_SETTING, PROXY_INDEXERS, \
AUTOPOSTPROCESSER_FREQUENCY, DEFAULT_AUTOPOSTPROCESSER_FREQUENCY, MIN_AUTOPOSTPROCESSER_FREQUENCY, \
ANIME_DEFAULT, NAMING_ANIME, USE_ANIDB, ANIDB_USERNAME, ANIDB_PASSWORD, ANIDB_USE_MYLIST, \
ANIME_SPLIT_HOME, SCENE_DEFAULT, BACKLOG_DAYS, SEARCH_UNAIRED, ANIME_TREAT_AS_HDTV, \
SCENE_DEFAULT, BACKLOG_DAYS, SEARCH_UNAIRED, ANIME_TREAT_AS_HDTV, \
COOKIE_SECRET, USE_IMDB_INFO, DISPLAY_BACKGROUND, DISPLAY_BACKGROUND_TRANSPARENT, DISPLAY_ALL_SEASONS, \
SHOW_TAGS, DEFAULT_SHOW_TAG, SHOWLIST_TAGVIEW
@ -978,7 +977,6 @@ def initialize(consoleLogging=True):
ANIDB_PASSWORD = check_setting_str(CFG, 'ANIDB', 'anidb_password', '')
ANIDB_USE_MYLIST = bool(check_setting_int(CFG, 'ANIDB', 'anidb_use_mylist', 0))
ANIME_SPLIT_HOME = bool(check_setting_int(CFG, 'ANIME', 'anime_split_home', 0))
ANIME_TREAT_AS_HDTV = bool(check_setting_int(CFG, 'ANIME', 'anime_treat_as_hdtv', 0))
METADATA_XBMC = check_setting_str(CFG, 'General', 'metadata_xbmc', '0|0|0|0|0|0|0|0|0|0')
@ -1792,7 +1790,7 @@ def save_config():
new_config['GUI']['poster_sortdir'] = POSTER_SORTDIR
new_config['GUI']['show_tags'] = ','.join(SHOW_TAGS)
new_config['GUI']['showlist_tagview'] = SHOWLIST_TAGVIEW
new_config['GUI']['default_tag'] = DEFAULT_SHOW_TAG
new_config['GUI']['default_show_tag'] = DEFAULT_SHOW_TAG
new_config['Subtitles'] = {}
new_config['Subtitles']['use_subtitles'] = int(USE_SUBTITLES)

View file

@ -3438,7 +3438,7 @@ class ConfigGeneral(Config):
def saveAddShowDefaults(self, default_status, any_qualities='', best_qualities='', default_wanted_begin=None,
default_wanted_latest=None, default_flatten_folders=False, default_scene=False,
default_subtitles=False, default_anime=False):
default_subtitles=False, default_anime=False, default_tag=''):
any_qualities = ([], any_qualities.split(','))[any(any_qualities)]
best_qualities = ([], best_qualities.split(','))[any(best_qualities)]
@ -3451,6 +3451,7 @@ class ConfigGeneral(Config):
sickbeard.SCENE_DEFAULT = config.checkbox_to_value(default_scene)
sickbeard.SUBTITLES_DEFAULT = config.checkbox_to_value(default_subtitles)
sickbeard.ANIME_DEFAULT = config.checkbox_to_value(default_anime)
sickbeard.DEFAULT_SHOW_TAG = default_tag
sickbeard.save_config()
@ -4670,7 +4671,7 @@ class ConfigAnime(Config):
return t.respond()
def saveAnime(self, use_anidb=None, anidb_username=None, anidb_password=None, anidb_use_mylist=None,
split_home=None, anime_treat_as_hdtv=None):
anime_treat_as_hdtv=None):
results = []
@ -4679,7 +4680,6 @@ class ConfigAnime(Config):
if set('*') != set(anidb_password):
sickbeard.ANIDB_PASSWORD = anidb_password
sickbeard.ANIDB_USE_MYLIST = config.checkbox_to_value(anidb_use_mylist)
sickbeard.ANIME_SPLIT_HOME = config.checkbox_to_value(split_home)
sickbeard.ANIME_TREAT_AS_HDTV = config.checkbox_to_value(anime_treat_as_hdtv)
sickbeard.save_config()