mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
safe spectrum parameter updates (thx @mherger)
I've remove the dclone as I confuses me a bit and I don't think it's needed
This commit is contained in:
@@ -3,7 +3,6 @@ package Plugins::SqueezeESP32::Graphics;
|
||||
use strict;
|
||||
|
||||
use base qw(Slim::Display::Squeezebox2);
|
||||
use Storable qw(dclone);
|
||||
|
||||
use Slim::Utils::Prefs;
|
||||
use Slim::Utils::Log;
|
||||
@@ -123,11 +122,8 @@ sub displayHeight {
|
||||
sub sanitizeSpectrum {
|
||||
my ($spectrum) = shift;
|
||||
|
||||
$spectrum->{small} ||= dclone($SPECTRUM_DEFAULTS{small});
|
||||
$spectrum->{small}->{size} ||= $SPECTRUM_DEFAULTS{small}->{size};
|
||||
$spectrum->{small}->{band} ||= $SPECTRUM_DEFAULTS{small}->{band};
|
||||
|
||||
$spectrum->{full} ||= dclone($SPECTRUM_DEFAULTS{full});
|
||||
$spectrum->{full}->{band} ||= $SPECTRUM_DEFAULTS{full}->{band};
|
||||
|
||||
return $spectrum;
|
||||
|
||||
Reference in New Issue
Block a user