mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-10 05:27:01 +03:00
Initialize and sanitize spectrum and artwork prefs.
This commit is contained in:
@@ -43,12 +43,18 @@ sub handler {
|
||||
if ($paramRef->{'saveSettings'}) {
|
||||
if ($client->displayWidth) {
|
||||
$cprefs->set('small_VU', $paramRef->{'pref_small_VU'} || 15);
|
||||
my $spectrum = {
|
||||
scale => $paramRef->{'pref_spectrum_scale'} || 25,
|
||||
small => { size => $paramRef->{'pref_spectrum_small_size'} || 25,
|
||||
band => $paramRef->{'pref_spectrum_small_band'} || 5.33 },
|
||||
full => { band => $paramRef->{'pref_spectrum_full_band'} } || 8,
|
||||
};
|
||||
|
||||
require Plugins::SqueezeESP32::Graphics;
|
||||
my $spectrum = Plugins::SqueezeESP32::Graphics::sanitizeSpectrum({
|
||||
scale => $paramRef->{'pref_spectrum_scale'},
|
||||
small => {
|
||||
size => $paramRef->{'pref_spectrum_small_size'},
|
||||
band => $paramRef->{'pref_spectrum_small_band'}
|
||||
},
|
||||
full => {
|
||||
band => $paramRef->{'pref_spectrum_full_band'}
|
||||
},
|
||||
});
|
||||
$cprefs->set('spectrum', $spectrum);
|
||||
|
||||
my $artwork = {
|
||||
|
||||
Reference in New Issue
Block a user