diff --git a/CHANGES.md b/CHANGES.md index 8e301a73..960d4573 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -46,6 +46,7 @@ * Fix Episode View KeyError: 'state-title' failure for shows without a runtime * Update py-unrar2 library 99.3 to 99.6 (2fe1e98) * Fix py-unrar2 on unix to handle different date formats output by different unrar command line versions +* Fix Add and Edit show quality selection when Quality 'Custom' is used [develop changelog] Enable Alpha Ratio again now that the secure login page over https is fixed diff --git a/gui/slick/interfaces/default/manage_massEdit.tmpl b/gui/slick/interfaces/default/manage_massEdit.tmpl index 771970c0..956ee8ce 100644 --- a/gui/slick/interfaces/default/manage_massEdit.tmpl +++ b/gui/slick/interfaces/default/manage_massEdit.tmpl @@ -64,7 +64,7 @@

Initial

#set $anyQualityList = filter(lambda x: x > $common.Quality.NONE, $common.Quality.qualityStrings) - #for $curQuality in sorted($anyQualityList): #end for @@ -73,7 +73,7 @@

Upgrade to

#set $bestQualityList = filter(lambda x: x > $common.Quality.SDTV, $common.Quality.qualityStrings) - #for $curQuality in sorted($bestQualityList): #end for diff --git a/gui/slick/js/qualityChooser.js b/gui/slick/js/qualityChooser.js index 095e225f..bef406b0 100644 --- a/gui/slick/js/qualityChooser.js +++ b/gui/slick/js/qualityChooser.js @@ -1,22 +1,24 @@ function setFromPresets (preset) { var elCustomQuality = $('.show-if-quality-custom'), selected = 'selected'; - if (0 == preset) { + if (preset = parseInt(preset)) { + elCustomQuality.hide(); + + var upgrade = !0; + $('#anyQualities, #bestQualities').find('option').each(function() { + if (upgrade && 'bestQualities' === $(this).parent().attr('id')) { + upgrade = !1; + switch (preset) { + case 3: preset = 128 + 32 + 4; break; + case 164: preset = 256 + 64 + 16 + 4; break; + case 336: preset = 256; break; + default: preset = 0; + } + } + $(this).attr(selected, ((preset & parseInt($(this).val())) ? selected : false)); + }); + } else elCustomQuality.show(); - return; - } - - elCustomQuality.hide(); - - $('#anyQualities').find('option').each(function() { - var result = preset & $(this).val(); - $(this).attr(selected, (0 < result ? selected : false)); - }); - - $('#bestQualities').find('option').each(function() { - var result = preset & ($(this).val() << 16); - $(this).attr(selected, (result > 0 ? selected: false)); - }); } $(document).ready(function() { @@ -24,7 +26,7 @@ $(document).ready(function() { selected = ':selected'; elQualityPreset.change(function() { - setFromPresets($('#qualityPreset').find(selected).val()); + setFromPresets($(this).find(selected).val()); }); setFromPresets(elQualityPreset.find(selected).val());