GoCubs;540159 Wrote: > > What would you expect to be provided for images? > A url if it's a image handled by SBS it's enough with the part, if it's an image available someone on Internet I need a complete url including host and port, for for example: /plugins/SuperDateTime/html/images/someimage.png Or http://somesite:1234/folder/someimage.png
GoCubs;540159 Wrote: > > Where/how do I include the image files in the SBS plugin so that > applets can access them via some sort of text url? > An image in the folder (inside your plugin dir): HTML/EN/html/plugins/SuperDateTime/html/images/someimage.png Is available as url: http://localhost:9000/plugins/SuperDateTime/html/images/someimage.png In this case, since it's a SBS url, it's enough if you provide: /plugins/SuperDateTime/html/images/someimage.png GoCubs;540159 Wrote: > > I wasn't aware of notifyFromArray. Can you provide an example or point > me in the direction of an existing plugin that makes use of this in a > similar fashion? > Honestly, I'm not 100% sure if this is the correct way, but I know it works because I used it in Custom Clock Helper: Code: -------------------- my $data = { 'attr1' => 'value1', 'attr1' => 'value2', }; Slim::Control::Request::notifyFromArray(undef,['superdatetime','somethingupdated',$data); -------------------- You can specify a $client object in the first parameter if you only want to send it to a specific player. You will also need to add the notification in initPlugin with addDispatch, as this: Code: -------------------- Slim::Control::Request::addDispatch(['superdatetime', 'somethingupdated'],[0, 1, 0, undef]); -------------------- The "superdatetime", "somethingupdated" notification about is just an example, you should of course use names that are relevant in your case. The notifyFromArray can take any number of parameters, so the above sample with a single data parameter is just an example, in the TrackStat plugin I for example use: Code: -------------------- Slim::Control::Request::notifyFromArray($client, ['trackstat', 'changedstatistic', $url, $track->id, $playCount, $lastPlayed]); -------------------- And the corresponding addDispatch call: Code: -------------------- Slim::Control::Request::addDispatch(['trackstat', 'changedstatistic', '_url', '_trackid', '_playcount',' _lastplayed'],[0, 0, 0, undef]); -------------------- -- erland Erland Isaksson 'My homepage' (http://erland.isaksson.info) (Install my plugins through Extension Downloader) (Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse, Custom Scan, Custom Skip, Multi Library, Title Switcher and Database Query plugins' (http://wiki.erland.isaksson.info/index.php/Category:SlimServer)) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=77864 _______________________________________________ jive mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/jive
