hires display fixes

This commit is contained in:
Philippe G
2020-12-02 14:05:23 -08:00
parent f06c08cef7
commit c576587de4
7 changed files with 17 additions and 10 deletions

Binary file not shown.

View File

@@ -187,11 +187,13 @@ sub update_artwork {
my $cprefs = $prefs->client($client); my $cprefs = $prefs->client($client);
my $artwork = $cprefs->get('artwork') || return; my $artwork = $cprefs->get('artwork') || return;
return unless $artwork->{'enable'}; return unless $artwork->{'enable'};
my $s = min($cprefs->get('height') - $artwork->{'y'}, $cprefs->get('width') - $artwork->{'x'}); my $header = pack('Nnn', $artwork->{'enable'}, $artwork->{'x'}, $artwork->{'y'});
$client->sendFrame( grfa => \$header );
$client->display->update;
my $s = min($cprefs->get('height') - $artwork->{'y'}, $cprefs->get('width') - $artwork->{'x'});
my $params = { force => shift || 0 }; my $params = { force => shift || 0 };
my $path = 'music/current/cover_' . $s . 'x' . $s . '_o.jpg'; my $path = 'music/current/cover_' . $s . 'x' . $s . '_o.jpg';
my $body = Slim::Web::Graphics::artworkRequest($client, $path, $params, \&send_artwork, undef, HTTP::Response->new); my $body = Slim::Web::Graphics::artworkRequest($client, $path, $params, \&send_artwork, undef, HTTP::Response->new);
@@ -251,6 +253,7 @@ sub config_artwork {
if ( my $artwork = $prefs->client($client)->get('artwork') ) { if ( my $artwork = $prefs->client($client)->get('artwork') ) {
my $header = pack('Nnn', $artwork->{'enable'}, $artwork->{'x'}, $artwork->{'y'}); my $header = pack('Nnn', $artwork->{'enable'}, $artwork->{'x'}, $artwork->{'y'});
$client->sendFrame( grfa => \$header ); $client->sendFrame( grfa => \$header );
$client->display->update;
} }
} }

View File

@@ -58,13 +58,14 @@ sub handler {
$cprefs->set('spectrum', $spectrum); $cprefs->set('spectrum', $spectrum);
my $artwork = { my $artwork = {
enable => $paramRef->{'pref_artwork_enable'}, enable => $paramRef->{'pref_artwork_enable'} eq 'on',
x => $paramRef->{'pref_artwork_x'} || 0, x => $paramRef->{'pref_artwork_x'} || 0,
y => $paramRef->{'pref_artwork_y'} || 0, y => $paramRef->{'pref_artwork_y'} || 0,
}; };
$cprefs->set('artwork', $artwork); $cprefs->set('artwork', $artwork);
$client->display->modes($client->display->build_modes); $client->display->modes($client->display->build_modes);
$client->display->update; # the display update will be done below, after all is completed
# force update or disable artwork # force update or disable artwork
if ($artwork->{'enable'}) { if ($artwork->{'enable'}) {
@@ -72,6 +73,7 @@ sub handler {
} else { } else {
$client->config_artwork(); $client->config_artwork();
} }
} }
my $equalizer = $cprefs->get('equalizer'); my $equalizer = $cprefs->get('equalizer');

View File

@@ -10,6 +10,6 @@
<name>PLUGIN_SQUEEZEESP32</name> <name>PLUGIN_SQUEEZEESP32</name>
<description>PLUGIN_SQUEEZEESP32_DESC</description> <description>PLUGIN_SQUEEZEESP32_DESC</description>
<module>Plugins::SqueezeESP32::Plugin</module> <module>Plugins::SqueezeESP32::Plugin</module>
<version>0.204</version> <version>0.210</version>
<creator>Philippe</creator> <creator>Philippe</creator>
</extensions> </extensions>

View File

@@ -80,8 +80,10 @@ PLUGIN_SQUEEZEESP32_ARTWORK
PLUGIN_SQUEEZEESP32_ARTWORK_DESC PLUGIN_SQUEEZEESP32_ARTWORK_DESC
DE Wenn die Y Position kleiner als 32 ist, dann werden Plattenhüllen auf der rechten Seite angezeigt, und x definiert die Startposition. DE Wenn die Y Position kleiner als 32 ist, dann werden Plattenhüllen auf der rechten Seite angezeigt, und x definiert die Startposition.
DE Plattenhüllen werden auf Displays mit weniger als 16 Graustufen in sehr geringer Qualität angezeigt. DE Plattenhüllen werden auf Displays mit weniger als 16 Graustufen in sehr geringer Qualität angezeigt.
EN When Y position is less than 32, then artwork is displayed at the right of the main screen and x defines the starting position EN When Y position is less than 32, then artwork is displayed at the right of the main screen and X defines the starting position
EN Using artwork on less than 16-levels grayscale display if really poor quality EN <br>On large screen, it's possible to rotate the VU/Spectrum by setting a small X offset (typically 32). That will push the
EN artwork to the right and make space for a vertical VU to its left.
EN <br>Note that using artwork on less than 16-levels grayscale display if really poor quality
PLUGIN_SQUEEZEESP32_ARTWORK_ENABLE PLUGIN_SQUEEZEESP32_ARTWORK_ENABLE
DE Aktivieren DE Aktivieren

View File

@@ -1,10 +1,10 @@
<?xml version='1.0' standalone='yes'?> <?xml version='1.0' standalone='yes'?>
<extensions> <extensions>
<plugins> <plugins>
<plugin version="0.204" name="SqueezeESP32" minTarget="7.9" maxTarget="*"> <plugin version="0.210" name="SqueezeESP32" minTarget="7.9" maxTarget="*">
<link>https://github.com/sle118/squeezelite-esp32</link> <link>https://github.com/sle118/squeezelite-esp32</link>
<creator>Philippe</creator> <creator>Philippe</creator>
<sha>a4b8b38c148b518dcc89c559785df60b0fe332e0</sha> <sha>dd66b0ac524595af833766c3cd790ee4ca96e0b6</sha>
<email>philippe_44@outlook.com</email> <email>philippe_44@outlook.com</email>
<desc lang="EN">SqueezeESP32 additional player id (100)</desc> <desc lang="EN">SqueezeESP32 additional player id (100)</desc>
<url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32.zip</url> <url>http://github.com/sle118/squeezelite-esp32/raw/master/plugin/SqueezeESP32.zip</url>