kdf;295154 Wrote: > Here is a quick and dirty patch that may work. I'm rather swamped with > a massive diy list these days so not much time to write, let alone > test. > > This is a patch against the latest from googlecode. If you use svn you > can just apply, if you use the installed package, it should be applied > against the extracted .par file. > > To add a callback simply call: > Plugins::ExtendedAlarm::Plugin->addCustomPlaylist($name,$callback) > > Where $name is a defined string token (raw text for name MAY work) > and $callback is the function you want to run when this custom playlist > is selected for the alarm. I guess with this, you could now even use the > plugin to schedule a rescan if that's what you wanted. The callback will > include the $client as the only arg, but I could add the ability to > supply additional callbackargs if required. > > -k
kdf, would it be possible to add the $name as a parameter in the callback so I don't have to define a callback for each individual playlist ? I can probably do the patch myself to verify it, I just like to check if you are ok with adding a $name parameter. I think the optimal solution from Dynamic Playlist point of view, would be if the register function took both a name and an id parameter, where the name was used for display and the id was used when issuing the callback, but that might require larger changes of the ExtendedAlarm plugin ? -- erland Erland Isaksson 'My homepage' (http://erland.homeip.net) 'My download page' (http://erland.homeip.net/download) (Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse, Custom Scan, Custom Skip, Multi Library and Database Query plugins' (http://wiki.erland.homeip.net/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=34668 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/lists/listinfo/plugins