mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
fae9ae6bb7
Change restrict changing custom download qualities to reasonable selections. Add upgrade to quality selections on Add show page and Import existing show page.
40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
$(document).ready(function(){
|
|
|
|
$('#saveDefaultsButton').click(function() {
|
|
var anyQualArray = [], bestQualArray = [];
|
|
|
|
$('#wanted-qualities option:selected').each(function(i, d) {
|
|
anyQualArray.push($(d).val());
|
|
});
|
|
$('#upgrade-qualities option:selected').each(function(i, d) {
|
|
bestQualArray.push($(d).val());
|
|
});
|
|
|
|
$.get(sbRoot + '/config/general/saveAddShowDefaults', {
|
|
default_status: $('#statusSelect').val(),
|
|
any_qualities: anyQualArray.join(','),
|
|
best_qualities: bestQualArray.join(','),
|
|
default_wanted_begin: $('#wanted_begin').val(),
|
|
default_wanted_latest: $('#wanted_latest').val(),
|
|
default_flatten_folders: $('#flatten_folders').prop('checked'),
|
|
default_scene: $('#scene').prop('checked'),
|
|
default_subtitles: $('#subtitles').prop('checked'),
|
|
default_anime: $('#anime').prop('checked'),
|
|
default_tag: $('#tag').val()
|
|
});
|
|
|
|
new PNotify({
|
|
title: 'Saving Defaults',
|
|
text: 'Saving your "add show" defaults.',
|
|
shadow: false
|
|
});
|
|
|
|
$(this).attr('disabled', true);
|
|
});
|
|
|
|
$('#statusSelect, #quality-preset, #wanted-qualities, #upgrade-qualities, #wanted_begin, #wanted_latest,'
|
|
+ ' #flatten_folders, #scene, #subtitles, #anime, #tag').change(function() {
|
|
$('#saveDefaultsButton').attr('disabled', false);
|
|
});
|
|
|
|
});
|