When BooScript extension is loaded, the extension will check the scripts. If there are scripts, it will compile them and execute. At this moment, lots of things are not initialized yet, so we have to add code to Application.ClientStarted. And application will execute our code after everything is initialized.
def OnClientStarted( client as Client ):
Hyena.Log.Information( "engine is playing now..." )
Hyena.Log.Information( "autoplay script is loaded." )
Banshee.ServiceStack.Application.ClientStarted += OnClientStarted
The script is very simple, I will add the functions to save the current track and to play the saved track automatically.