Hi All,
Im after a bit of help making a plugin, first of im writing this one in vb .net and its a JukeBox Plugin.
The idea of it is to implement something similar to the XBMC party mode, except with a few more features and some other stuff
anyway, im looking for a way to do load some code each time a song is changed.
I have been having a look at the doco and also have the latest SVN which I have been searching over to try and find some examples, and i have found what im after but as its in C# it doesnt translate well to vb .net ( I have tried a few of the websites that convert it for you with no luck)
Here is the code i have so far below, nothing is underlined as wrong in visual studio and no errors appear in the log, its just the messagebox doesnt show up when the song is changed.
The idea is to have a small playlist say 5 songs or something and everytime the current song is changed it removes the current song from the play list and adds another random song, this part im sure i can do its just getting it to trigger the code.
When I change song in MP i can see the g_Player.PlayBackStarted event in the logs but like i said i dont get the message box pop up so its not doing anything.
Any help getting this up and running is much apreaciated
Im after a bit of help making a plugin, first of im writing this one in vb .net and its a JukeBox Plugin.
The idea of it is to implement something similar to the XBMC party mode, except with a few more features and some other stuff
anyway, im looking for a way to do load some code each time a song is changed.
I have been having a look at the doco and also have the latest SVN which I have been searching over to try and find some examples, and i have found what im after but as its in C# it doesnt translate well to vb .net ( I have tried a few of the websites that convert it for you with no luck)
Here is the code i have so far below, nothing is underlined as wrong in visual studio and no errors appear in the log, its just the messagebox doesnt show up when the song is changed.
WithEvents eClass As MediaPortal.Player.g_Player
Public Sub test(ByVal type As g_Player.MediaType, ByVal filename As String) Handles eClass.PlayBackStarted
MsgBox(filename)
End Sub
The idea is to have a small playlist say 5 songs or something and everytime the current song is changed it removes the current song from the play list and adds another random song, this part im sure i can do its just getting it to trigger the code.
When I change song in MP i can see the g_Player.PlayBackStarted event in the logs but like i said i dont get the message box pop up so its not doing anything.
Any help getting this up and running is much apreaciated