From 4192263176f107991b659ca22a67f91ac6007bb7 Mon Sep 17 00:00:00 2001
From: tryptz <216453278+tryptz@users.noreply.github.com>
Date: Tue, 7 Apr 2026 04:36:04 +0000
Subject: [PATCH] style: auto-fix linting issues
---
index.html | 40 +++++++++++++++++-----------------------
js/audio-context.js | 26 ++++++++++++++++++++++----
js/settings.js | 5 ++---
js/storage.js | 16 ++++++++++++----
4 files changed, 53 insertions(+), 34 deletions(-)
diff --git a/index.html b/index.html
index 91c19e7..84dad20 100644
--- a/index.html
+++ b/index.html
@@ -4174,33 +4174,29 @@
×
-
+
Legacy EQ - Graphic Equalizer
-
Set the number of bands (3-32) and
- frequency range (Min/Max Hz) at the top to
- customize the equalizer layout.
+ frequency range (Min/Max Hz) at the top to customize the
+ equalizer layout.
-
- Drag the sliders to boost or cut each frequency
- band. Bands are spaced logarithmically across your range.
+ Drag the sliders to boost or cut each frequency band. Bands
+ are spaced logarithmically across your range.
-
- Pick a preset (Bass Boost, Rock, Vocal, etc.) as a
- starting point - presets auto-scale to your band count.
+ Pick a preset (Bass Boost, Rock, Vocal, etc.) as a starting
+ point - presets auto-scale to your band count.
-
- Adjust the preamp slider to raise or lower the overall
- level - reduce it if you hear distortion from large boosts.
+ Adjust the preamp slider to raise or lower the overall level
+ - reduce it if you hear distortion from large boosts.
-
- Save your own custom presets with a name so you can
- recall them later.
+ Save your own custom presets with a name so you can recall
+ them later.
-
Export saves the EQ in EqualizerAPO text format.
@@ -4208,17 +4204,15 @@
directly into Equalizer APO's config.txt.
-
- Import loads EQ settings from EqualizerAPO text files
- or simple frequency/gain CSV files - points are mapped to
- your current bands automatically.
-
- -
- Click Reset to flatten all bands back to 0 dB.
+ Import loads EQ settings from EqualizerAPO text files or
+ simple frequency/gain CSV files - points are mapped to your current
+ bands automatically.
+ - Click Reset to flatten all bands back to 0 dB.
- 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.
diff --git a/js/audio-context.js b/js/audio-context.js
index ae5e19b..38a8b75 100644
--- a/js/audio-context.js
+++ b/js/audio-context.js
@@ -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 {
diff --git a/js/settings.js b/js/settings.js
index feb11c5..9cb48fa 100644
--- a/js/settings.js
+++ b/js/settings.js
@@ -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)
diff --git a/js/storage.js b/js/storage.js
index 1901260..184971b 100644
--- a/js/storage.js
+++ b/js/storage.js
@@ -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) {