Enhancement to Web UI client settings

If there is no image for a specific client model, the default image is
displayed.

Source of the image is: GitHub squeezeplay
icon_default.png  renamed to default.png (according to the syntax of the other images)

+ two additional images for new models
OpenFrame1.png
OpenFrame2.png

I decided to use 'baseSkin' which is substituted to 'EN' within 
SkinManager.pm to avoid hardcoding the default directors.

analogue to:
skinDefault -> Default
baseSkin -> EN

never the less; with reference to you statement this is not needed at all.
The code below should be sufficient to reach my goal.


> +		$model = Slim::Web::HTTP::fixHttpPath($paramRef->{'skinOverride'} || $prefs->get('skin'), "html/images/Players/$model.png")?$model:'default';

but we need to change the call parameters:

Basic.pm

$paramRef->{'playericon'} = $class->getPlayerIcon($client,$paramRef);

......

sub getPlayerIcon {
     my ($class, $client, $paramRef) = @_;


Wizard.pm

         $paramRef->{playericon} = 
Slim::Web::Settings::Player::Basic->getPlayerIcon($client,$paramRef);




Am 11.11.2014 um 22:42 schrieb mherger:
>
> In Slim/Web/Settings/Player/Basic.pm:
>
> > @@ -229,6 +229,9 @@ sub getPlayerIcon {
> >  	$model = 'squeezebox' if $model eq 'squeezebox2';
> >  	$model = 'softsqueeze' if $model =~ /(?:http|squeezeslave)/i;
> >  	
> > +	# Check if the $model (or 'default' ) image exists
> > +	$model = Slim::Web::HTTP::fixHttpPath($prefs->get('skin') || 'baseSkin', "html/images/Players/$model.png")?$model:
>
> What's 'baseSkin' supposed to do? Shouldn't this be 'EN'? And 
> shouldn't we check for skinOverride first instead? Most likely it 
> doesn't matter anyway, but it would be correct. 'skinOverride' would 
> be the skin you can chose in the URL when opening the web UI. Eg. 
> http://localhost:900/Classic/ -> skinOverride = 'Classic'. 'EN' is the 
> base skin.
>
> And we don't need to check for default.png, as we know we do commit it.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/Logitech/slimserver/pull/38/files#r20182669>.
>