Skip to content

Commit

Permalink
Merge pull request #6362 from nyanmisaka/sw-tonemap-by-default
Browse files Browse the repository at this point in the history
  • Loading branch information
thornbill authored Dec 29, 2024
2 parents e15d700 + a3872ff commit 5b4cfbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/controllers/dashboard/encodingsettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h3 class="checkboxListLabel">${LabelEncodingFormatOptions}</h3>
</div>

<div class="tonemappingOptions hide">
<div class="checkboxListContainer checkboxContainer-withDescription">
<div class="checkboxListContainer checkboxContainer-withDescription fldTonemapCheckbox hide">
<label>
<input type="checkbox" is="emby-checkbox" id="chkTonemapping" />
<span>${EnableTonemapping}</span>
Expand Down
7 changes: 6 additions & 1 deletion src/controllers/dashboard/encodingsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,15 @@ $(document).on('pageinit', '#encodingSettingsPage', function () {
}

const isHwaSelected = [ 'amf', 'nvenc', 'qsv', 'vaapi', 'rkmpp', 'videotoolbox' ].includes(this.value);
if (this.value === 'none' || isHwaSelected) {
if (this.value === 'none') {
page.querySelector('.tonemappingOptions').classList.remove('hide');
page.querySelector('.fldTonemapCheckbox').classList.add('hide');
} else if (isHwaSelected) {
page.querySelector('.tonemappingOptions').classList.remove('hide');
page.querySelector('.fldTonemapCheckbox').classList.remove('hide');
} else {
page.querySelector('.tonemappingOptions').classList.add('hide');
page.querySelector('.fldTonemapCheckbox').classList.add('hide');
}

page.querySelector('.tonemappingModeOptions').classList.toggle('hide', !isHwaSelected);
Expand Down

0 comments on commit 5b4cfbf

Please sign in to comment.