style: auto-fix linting issues

This commit is contained in:
tryptz 2026-04-07 04:36:04 +00:00 committed by edideaur
parent a16d489b9f
commit 4192263176
4 changed files with 53 additions and 34 deletions

View file

@ -4174,33 +4174,29 @@
×
</button>
<div
class="eq-howto-tab legacy"
id="eq-howto-legacy"
style="display: none"
>
<div class="eq-howto-tab legacy" id="eq-howto-legacy" style="display: none">
<h4>Legacy EQ - Graphic Equalizer</h4>
<ol>
<li>
Set the <b>number of bands</b> (3-32) and
<b>frequency range</b> (Min/Max Hz) at the top to
customize the equalizer layout.
<b>frequency range</b> (Min/Max Hz) at the top to customize the
equalizer layout.
</li>
<li>
<b>Drag the sliders</b> to boost or cut each frequency
band. Bands are spaced logarithmically across your range.
<b>Drag the sliders</b> to boost or cut each frequency band. Bands
are spaced logarithmically across your range.
</li>
<li>
Pick a <b>preset</b> (Bass Boost, Rock, Vocal, etc.) as a
starting point - presets auto-scale to your band count.
Pick a <b>preset</b> (Bass Boost, Rock, Vocal, etc.) as a starting
point - presets auto-scale to your band count.
</li>
<li>
Adjust the <b>preamp</b> slider to raise or lower the overall
level - reduce it if you hear distortion from large boosts.
Adjust the <b>preamp</b> slider to raise or lower the overall level
- reduce it if you hear distortion from large boosts.
</li>
<li>
<b>Save</b> your own custom presets with a name so you can
recall them later.
<b>Save</b> your own custom presets with a name so you can recall
them later.
</li>
<li>
<b>Export</b> saves the EQ in EqualizerAPO text format.
@ -4208,17 +4204,15 @@
directly into Equalizer APO's config.txt.
</li>
<li>
<b>Import</b> loads EQ settings from EqualizerAPO text files
or simple frequency/gain CSV files - points are mapped to
your current bands automatically.
</li>
<li>
Click <b>Reset</b> to flatten all bands back to 0 dB.
<b>Import</b> loads EQ settings from EqualizerAPO text files or
simple frequency/gain CSV files - points are mapped to your current
bands automatically.
</li>
<li>Click <b>Reset</b> to flatten all bands back to 0 dB.</li>
</ol>
<p class="eq-howto-tip">
Tip: Cut problem frequencies rather than boosting others - it
sounds cleaner and avoids clipping.
Tip: Cut problem frequencies rather than boosting others - it sounds
cleaner and avoids clipping.
</p>
</div>

View file

@ -731,7 +731,11 @@ class AudioContextManager {
const coeffs = computeShelfCoefficients(type, freq, gain, q, this.audioContext.sampleRate);
const iir = this.audioContext.createIIRFilter(coeffs.feedforward, coeffs.feedback);
iir._shelfType = type;
try { filter.disconnect(); } catch { /* ignore */ }
try {
filter.disconnect();
} catch {
/* ignore */
}
this.filters[index] = iir;
}
@ -939,10 +943,20 @@ class AudioContextManager {
if (isShelf) {
// IIR filters can't update params — must replace the node
const coeffs = computeShelfCoefficients(type, newFrequencies[i], newGains[i], q, this.audioContext.sampleRate);
const coeffs = computeShelfCoefficients(
type,
newFrequencies[i],
newGains[i],
q,
this.audioContext.sampleRate
);
const iir = this.audioContext.createIIRFilter(coeffs.feedforward, coeffs.feedback);
iir._shelfType = type;
try { filter.disconnect(); } catch { /* ignore */ }
try {
filter.disconnect();
} catch {
/* ignore */
}
this.filters[i] = iir;
needsReconnect = true;
} else if (wasShelf) {
@ -952,7 +966,11 @@ class AudioContextManager {
biquad.frequency.value = newFrequencies[i];
biquad.gain.value = newGains[i];
biquad.Q.value = q;
try { filter.disconnect(); } catch { /* ignore */ }
try {
filter.disconnect();
} catch {
/* ignore */
}
this.filters[i] = biquad;
needsReconnect = true;
} else {

View file

@ -1667,9 +1667,8 @@ export async function initializeSettings(scrobbler, player, api, ui) {
updateDeleteBtnVisibility();
return;
}
const adjusted = gains.length !== geqBandCount
? equalizerSettings._interpolateGains(gains, geqBandCount)
: gains;
const adjusted =
gains.length !== geqBandCount ? equalizerSettings._interpolateGains(gains, geqBandCount) : gains;
geqGains = adjusted.map((g) => {
const n = Number(g);
return Number.isFinite(n)

View file

@ -1730,7 +1730,9 @@ export const equalizerSettings = {
const num = parseInt(val, 10);
if (num >= 3 && num <= 32) return num;
}
} catch { /* ignore */ }
} catch {
/* ignore */
}
return 16;
},
@ -1738,7 +1740,9 @@ export const equalizerSettings = {
const clamped = Math.max(3, Math.min(32, parseInt(count, 10) || 16));
try {
localStorage.setItem(this.GEQ_BAND_COUNT_KEY, String(clamped));
} catch { /* ignore */ }
} catch {
/* ignore */
}
},
getGraphicEqFreqRange() {
@ -1750,7 +1754,9 @@ export const equalizerSettings = {
return parsed;
}
}
} catch { /* ignore */ }
} catch {
/* ignore */
}
return { min: 25, max: 20000 };
},
@ -1760,7 +1766,9 @@ export const equalizerSettings = {
if (clampedMin >= clampedMax) return;
try {
localStorage.setItem(this.GEQ_FREQ_RANGE_KEY, JSON.stringify({ min: clampedMin, max: clampedMax }));
} catch { /* ignore */ }
} catch {
/* ignore */
}
},
getGraphicEqGains(bandCount) {