Fix saving default show list group on add new show options page

This commit is contained in:
Adam 2015-08-09 11:12:49 +08:00
parent 627179f3d7
commit 53eb406817
4 changed files with 7 additions and 4 deletions

View file

@ -3,6 +3,7 @@
* 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
### 0.10.0 (2015-08-06 11:05:00 UTC)

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

@ -1792,7 +1792,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()