Index: server/Slim/Plugin/ShoutcastBrowser/Plugin.pm =================================================================== --- server/Slim/Plugin/ShoutcastBrowser/Plugin.pm (revision 14786) +++ server/Slim/Plugin/ShoutcastBrowser/Plugin.pm (working copy) @@ -113,6 +113,8 @@ my $url = 'plugins/ShoutcastBrowser/index.html'; Slim::Web::Pages->addPageLinks('radio', { $title => $url }); + Slim::Web::Pages->addPageLinks('icons', { $title => 'html/images/ServiceProviders/shoutcastbrowser.png' }); + Slim::Web::HTTP::protectURI($url); Slim::Web::HTTP::addPageFunction($url => sub { Index: server/Slim/Plugin/OPMLBased.pm =================================================================== --- server/Slim/Plugin/OPMLBased.pm (revision 14786) +++ server/Slim/Plugin/OPMLBased.pm (working copy) @@ -19,6 +19,10 @@ *{$class.'::'.'menu'} = sub { $args{menu} }; } + if (exists $args{'icon-id'}) { + Slim::Web::Pages->addPageLinks("icons", { $class->getDisplayName => $args{'icon-id'} }); + } + my $cliQuery = sub { my $request = shift; Slim::Buttons::XMLBrowser::cliQuery( $args{tag}, $args{feed}, $request ); Index: server/Slim/Plugin/RhapsodyDirect/Plugin.pm =================================================================== --- server/Slim/Plugin/RhapsodyDirect/Plugin.pm (revision 14786) +++ server/Slim/Plugin/RhapsodyDirect/Plugin.pm (working copy) @@ -32,7 +32,7 @@ feed => Slim::Networking::SqueezeNetwork->url('/api/rhapsody/v1/opml'), tag => 'rhapsodydirect', menu => 'music_on_demand', - 'icon-id' => 'http://localhost:9000/html/images/ServiceProviders/rhapsodydirect_56x56_p.png', + 'icon-id' => 'html/images/ServiceProviders/rhapsodydirect_56x56_p.png', ); if ( !$ENV{SLIM_SERVICE} ) { Index: server/Slim/Plugin/RadioTime/Plugin.pm =================================================================== --- server/Slim/Plugin/RadioTime/Plugin.pm (revision 14786) +++ server/Slim/Plugin/RadioTime/Plugin.pm (working copy) @@ -116,6 +116,8 @@ my $url = 'plugins/RadioTime/index.html'; Slim::Web::Pages->addPageLinks('radio', { $title => $url }); + Slim::Web::Pages->addPageLinks('icons', { $title => 'html/images/ServiceProviders/radiotime.png' }); + Slim::Web::HTTP::protectURI($url); Slim::Web::HTTP::addPageFunction($url, sub { Index: server/Slim/Plugin/Podcast/Plugin.pm =================================================================== --- server/Slim/Plugin/Podcast/Plugin.pm (revision 14786) +++ server/Slim/Plugin/Podcast/Plugin.pm (working copy) @@ -132,6 +132,8 @@ my $url = 'plugins/Podcast/index.html'; Slim::Web::Pages->addPageLinks('radio', { $title => $url }); + Slim::Web::Pages->addPageLinks('icons', { $title => 'html/images/ServiceProviders/podcast.png' }); + Slim::Web::HTTP::protectURI($url); Slim::Web::HTTP::addPageFunction( Index: server/HTML/Nokia770/home.html =================================================================== --- server/HTML/Nokia770/home.html (revision 14786) +++ server/HTML/Nokia770/home.html (working copy) @@ -85,7 +85,7 @@ [%- iconWidth = 80 -%] [% UNLESS loop.index % 2 %][% END %] - radio + radio [% key | string %] Index: server/HTML/Default/home.html =================================================================== --- server/HTML/Default/home.html (revision 14786) +++ server/HTML/Default/home.html (working copy) @@ -107,26 +107,26 @@ [% BLOCK menuItem; page = page | lower %]
-
+
[% IF expandable %] [% ELSE %] [% END %] - [% IF (page == 'radio' || page == 'music_on_demand') && additionalLinks.icons.${link.key}.url %] + [% IF (page == 'radio' || page == 'music_on_demand') && additionalLinks.icons.${link.key} %] - [% link.key | string %] + [% link.key | string %]
[% link.key | string %]
[% ELSE %] - [% IF additionalLinks.icons.${link.key}.url %] + [% IF additionalLinks.icons.${link.key} %] - [% link.key | string %] + [% link.key | string %]
[% END %] [% link.key | getstring %] - [% IF additionalLinks.icons.${link.key}.url %] + [% IF additionalLinks.icons.${link.key} %]
[% END %] [% END %] Index: server/Slim/Web/Pages/Home.pm =================================================================== --- server/Slim/Web/Pages/Home.pm (revision 14786) +++ server/Slim/Web/Pages/Home.pm (working copy) @@ -26,13 +26,15 @@ Slim::Web::HTTP::addPageFunction(qr/^index\.(?:htm|xml)/, sub {$class->home(@_)}); Slim::Web::HTTP::addPageFunction(qr/^squeezenetwork\.(?:htm|xml)/, sub {$class->squeezeNetwork(@_)}); - $class->addPageLinks("help",{'GETTING_STARTED' => "html/docs/quickstart.html"}); - $class->addPageLinks("help",{'HELP_REMOTE' => "html/docs/remote.html"}); - $class->addPageLinks("help",{'REMOTE_STREAMING' => "html/docs/remotestreaming.html"}); - $class->addPageLinks("help",{'FAQ' => "http://faq.slimdevices.com/"},1); - $class->addPageLinks("plugins",{'SOFTSQUEEZE' => "html/softsqueeze/index.html"}); - $class->addPageLinks("help",{'TECHNICAL_INFORMATION' => "html/docs/index.html"}); - $class->addPageLinks("radio",{'SQUEEZENETWORK_SWITCH' => "squeezenetwork.html"}); + $class->addPageLinks("help", { 'GETTING_STARTED' => "html/docs/quickstart.html"}); + $class->addPageLinks("help", { 'HELP_REMOTE' => "html/docs/remote.html"}); + $class->addPageLinks("help", { 'REMOTE_STREAMING' => "html/docs/remotestreaming.html"}); + $class->addPageLinks("help", { 'FAQ' => "http://faq.slimdevices.com/"},1); + $class->addPageLinks("plugins", { 'SOFTSQUEEZE' => "html/softsqueeze/index.html"}); + $class->addPageLinks("help", { 'TECHNICAL_INFORMATION' => "html/docs/index.html"}); + $class->addPageLinks("radio", { 'SQUEEZENETWORK_SWITCH' => "squeezenetwork.html"}); + $class->addPageLinks('icons', { 'SQUEEZENETWORK_SWITCH' => 'html/images/ServiceProviders/squeezenetwork.png' }); + $class->addPageLinks('icons', { 'RADIO_TUNEIN' => 'html/images/ServiceProviders/tuneinurl.png' }); } sub home { Index: server/Slim/Web/Pages.pm =================================================================== --- server/Slim/Web/Pages.pm (revision 14786) +++ server/Slim/Web/Pages.pm (working copy) @@ -94,7 +94,7 @@ my $separator = ''; - if (!$noquery) { + if (!$noquery && $category ne 'icons') { if ($path =~ /\?/) { $separator = '&'; @@ -103,28 +103,6 @@ } } - if ($category eq 'radio' || $category eq 'music_on_demand') { - my $iconName = $path; - $iconName =~ s/\.\w+$//; - $iconName =~ s/plugins\/([^\/]+)\/.*/$1/; - $iconName .= ".png"; - # let's just lowercase everything to save me the trouble at figuring out case - $iconName = lc($iconName); - - # do an OS-independent check for a readable image - for my $dir ( Slim::Utils::OSDetect::dirsFor('HTML') ) { - if ( -r catfile( $dir, qw/EN html images ServiceProviders/, $iconName ) ) { - $additionalLinks{'icons'}->{$title}{'url'} = 'html/images/ServiceProviders/' . $iconName; - $additionalLinks{'icons'}->{$title}{'icon'} = $iconName; - last; - } - } - - if ( !$additionalLinks{'icons'}->{$title}{'url'} ) { - $additionalLinks{'icons'}->{$title}{'url'} = 'html/images/radio.png'; - $additionalLinks{'icons'}->{$title}{'icon'} = $iconName; - } - } $additionalLinks{$category}->{$title} = $path . $separator; } else {