Plugin Development Help - Music Now Playing (1 Viewer)

kyleh0000

MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    Hi All,

    Im looking for a little help from the community in developing my first plugin...

    So far I have been doing well im able to access the MP Databases, create variables, Load and Save playlists and poplates the facade views.

    However im having problems with the MusicNowPlaying screen it seems when I play audio I am unable to access this screen, i try to change to it by pressing x to access full screen music however the plugin just seems to crash out (ie the music stops and I get returned to the home screen)

    I dont have any logs at the moment however now with RC3 being released ill start looking at the logs to find a solution in there.

    I was just wondering if anyone has tried to make a music plugin before and had this issue? i have been looking on these forums for a while not but so far not found anything like what i need. I hopeing for a some source code or something for any sort of music plugin that is able to use the NowPlaying screen.

    your help is always apreciated:D
     

    kyleh0000

    MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    yay i got it working!!

    took 3 days of banging my head against the wall but it working!

    here is the code for anyone else want to know how to do this:)

    Protected Sub LoadPlayList(ByVal strPlayList As String, ByVal startPlayback As Boolean)
    Dim loader As IPlayListIO = PlayListFactory.CreateIO(strPlayList)
    Dim playListPlayer As PlayListPlayer
    playlistPlayer = playlistPlayer.SingletonPlayer
    If loader Is Nothing Then
    Exit Sub
    End If
    Dim playlist As New PlayList()

    If Not File.Exists(strPlayList) Then
    Log.Info("Playlist: Skipping non-existing Playlist file: {0}", strPlayList)
    Exit Sub
    End If

    loader.Load(playlist, strPlayList)


    playlistPlayer.CurrentPlaylistName = Path.GetFileNameWithoutExtension(strPlayList)


    For i As Integer = 0 To playlist.Count - 1

    Dim playListItem As PlayListItem = playlist(i)

    playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Add(playListItem)

    Next

    playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC

    playlistPlayer.Reset()

    playlistPlayer.Play(0)

    End Sub
     

    Users who are viewing this thread

    Top Bottom