Fix a bug in with single language mode enabled #78

pull/115/merge
morpheus65535 6 years ago
parent 74403be4e8
commit f948814696

@ -753,6 +753,8 @@ def save_settings():
c.execute("UPDATE table_settings_general SET serie_default_enabled = ?", (settings_serie_default_enabled,))
settings_serie_default_languages = str(request.forms.getall('settings_serie_default_languages'))
if settings_serie_default_languages == "['None']":
settings_serie_default_languages = 'None'
c.execute("UPDATE table_settings_general SET serie_default_languages = ?", (settings_serie_default_languages,))
settings_serie_default_hi = request.forms.get('settings_serie_default_hi')
@ -770,6 +772,8 @@ def save_settings():
c.execute("UPDATE table_settings_general SET movie_default_enabled = ?", (settings_movie_default_enabled,))
settings_movie_default_languages = str(request.forms.getall('settings_movie_default_languages'))
if settings_movie_default_languages == "['None']":
settings_movie_default_languages = 'None'
c.execute("UPDATE table_settings_general SET movie_default_languages = ?", (settings_movie_default_languages,))
settings_movie_default_hi = request.forms.get('settings_movie_default_hi')

@ -930,7 +930,7 @@
%if settings_general[9] == 'False':
<option value="">Languages</option>
%else:
<option value="">None</option>
<option value="None">None</option>
%end
</select>
</div>
@ -987,7 +987,7 @@
%if settings_general[9] == 'False':
<option value="">Languages</option>
%else:
<option value="">None</option>
<option value="None">None</option>
%end
</select>
</div>
@ -1223,6 +1223,18 @@
$("#settings_movie_default_hi_div").checkbox('uncheck');
}
if ($("#settings_single_language").checkbox('is checked')) {
$("#settings_serie_default_languages").parent().removeClass('multiple');
$("#settings_serie_default_languages").removeAttr('multiple');
$("#settings_movie_default_languages").parent().removeClass('multiple');
$("#settings_movie_default_languages").removeAttr('multiple');
} else {
$("#settings_serie_default_languages").parent().addClass('multiple');
$("#settings_serie_default_languages").attr('multiple');
$("#settings_movie_default_languages").parent().addClass('multiple');
$("#settings_movie_default_languages").attr('multiple');
}
$("#settings_single_language").change(function(i, obj) {
if ($("#settings_single_language").checkbox('is checked')) {
$("#settings_serie_default_languages").dropdown('clear');

Loading…
Cancel
Save