home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Plugin Development Help - Music Now Playing
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kyleh0000" data-source="post: 619218" data-attributes="member: 91207"><p>yay i got it working!!</p><p></p><p>took 3 days of banging my head against the wall but it working!</p><p></p><p>here is the code for anyone else want to know how to do this<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p> Protected Sub LoadPlayList(ByVal strPlayList As String, ByVal startPlayback As Boolean)</p><p> Dim loader As IPlayListIO = PlayListFactory.CreateIO(strPlayList)</p><p> Dim playListPlayer As PlayListPlayer</p><p> playlistPlayer = playlistPlayer.SingletonPlayer</p><p> If loader Is Nothing Then</p><p> Exit Sub</p><p> End If</p><p> Dim playlist As New PlayList()</p><p></p><p> If Not File.Exists(strPlayList) Then</p><p> Log.Info("Playlist: Skipping non-existing Playlist file: {0}", strPlayList)</p><p> Exit Sub</p><p> End If</p><p></p><p> loader.Load(playlist, strPlayList)</p><p></p><p></p><p> playlistPlayer.CurrentPlaylistName = Path.GetFileNameWithoutExtension(strPlayList)</p><p></p><p></p><p> For i As Integer = 0 To playlist.Count - 1</p><p></p><p> Dim playListItem As PlayListItem = playlist(i)</p><p></p><p> playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Add(playListItem)</p><p></p><p> Next</p><p></p><p> playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC</p><p></p><p> playlistPlayer.Reset()</p><p></p><p> playlistPlayer.Play(0)</p><p></p><p> End Sub</p></blockquote><p></p>
[QUOTE="kyleh0000, post: 619218, member: 91207"] 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 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Plugin Development Help - Music Now Playing
Contact us
RSS
Top
Bottom