mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed quality settings
This commit is contained in:
parent
2a1bb8989f
commit
5f217f5720
4 changed files with 28 additions and 17 deletions
|
@ -70,21 +70,19 @@ $(document).on('click', '.quality-selectee', function () {
|
|||
var cleanId = getCleanId(this);
|
||||
var cutoff = '#' + cleanId + '_Cutoff';
|
||||
var name = jQuery('[for="' + id + '"]').children('.ui-button-text').text();
|
||||
var qualityId = $(this).attr('data-quality-id');
|
||||
|
||||
//Remove 'Unknown'
|
||||
$(cutoff + ' option').each(function () { if ($(this).text().indexOf('Unknown') > -1) $(cutoff + ' option').remove(':contains("' + $(this).text() + '")'); });
|
||||
|
||||
//Add option to cutoff SelectList
|
||||
if ($(this).attr('checked')) {
|
||||
$('<option>' + name + '</option>').appendTo(cutoff);
|
||||
$('<option>' + name + '</option>').val(qualityId).appendTo(cutoff);
|
||||
}
|
||||
|
||||
//Remove option from cutoff SelectList
|
||||
else {
|
||||
$(cutoff + ' option').each(function () {
|
||||
if ($(this).text().indexOf(name) > -1)
|
||||
$(cutoff + ' option').remove(':contains("' + $(this).text() + '")');
|
||||
});
|
||||
$(cutoff).find('option[value="' + qualityId + '"]').remove();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue