Quellcode durchsuchen

Fix for wrong loudness value being sent when user requests loudness 0

David Carr vor 7 Monaten
Ursprung
Commit
befc81f573
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      plugin/SqueezeESP32/Player.pm

+ 2 - 1
plugin/SqueezeESP32/Player.pm

@@ -220,7 +220,8 @@ sub send_equalizer {
 sub send_loudness {
 	my ($client, $loudness) = @_;
    
-    $loudness ||= $prefs->client($client)->get('loudness') || 0;
+    $loudness = defined $loudness ? $loudness : $prefs->client($client)->get('loudness');
+
 	my $data = pack("c1", $loudness);
 	$client->sendFrame( loud => \$data );   
 }