Bug 6163 - no way for 3rd party plugins to add custom icons
: no way for 3rd party plugins to add custom icons
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: unspecified
: Macintosh Other
: P2 normal (vote)
: ---
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-15 14:43 UTC by Ben Klaas
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
full patch for current items (9.47 KB, patch)
2007-11-16 22:39 UTC, KDF
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Klaas 2007-11-15 14:43:47 UTC
OPML-based radio plugins should have a means to add custom icons for use in both the web UI and on Jive.

mine to fix in Slim::Web::Pages.pm


this is the section that needs changing, around line 115:
# 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;
          }
}
Comment 1 KDF 2007-11-16 22:39:48 UTC
Created attachment 2421 [details]
full patch for current items

this goes above and beyond the rough patch in campfire.  I've added the addPageLinks calls from the non-opmlbased subclasses and the SN and TuneIn hardcoed additions.  This seems to now be at par with what exists, but now add the ability to use a call from any plugin to use any image.

Given that plugin may use this API, it will be nice to have Jive automatically replace the .png with _56x56_p.png for the images as a standard.
Comment 2 KDF 2007-11-18 13:25:21 UTC
merged to trunk at change 14817.
Comment 3 Ben Klaas 2007-11-18 20:15:15 UTC
Additional changes to support this bugfix--

client-side now sets the icon resizing parameters, so it is now invalid to define your icon-id with the server-side resize params already in the path.

that is,
'icon-id' => '/some/path/to/myicon_56x56_p.png',
should now be,
'icon-id' => '/some/path/to/myicon.png',

this is implemented in jive r929 and SC change 14820
Comment 4 Chris Owens 2008-03-07 09:03:39 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.