Creating a playlist from a plugin (1 Viewer)

hikarurd

Portal Member
February 14, 2011
8
0
Home Country
United States of America United States of America
I'm trying to figure out how to build a playlist from within a plug
I can create the playlist but I can not see it when I go back to mediaport and look for it.
I am trying to load into the current playlist

basically i do this

Code:
                                PlayListItem newItem = new PlayListItem(ep.EpisodeName,fn,0);
                                newItem.Type = PlayListItem.PlayListItemType.Video;
                                newItem.FileName = fn;
                                playlist.Add(newItem);
When I look at the playlist from the debugger it looks ok

when I go into mediaport and select playlist the current playlist is empty

what is the correct process to build and then start playing a playlist?

Thank you
 

hikarurd

Portal Member
February 14, 2011
8
0
Home Country
United States of America United States of America
Can anyone point me to where I might find out how to access playlists (create, play, save) from within a plug-in?
 

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I think you need to specify the playlist you want to add the items to

    You are obviously looking at video playlists but it should basically be the same as music

    Try the AddItemsToPlaylist method in WebSVN - MediaPortal - Rev 27491 - /trunk/mediaportal/WindowPlugins/GUIMusic/GUIMusicBaseWindow.cs

    I think you just need to add
    Code:
          playlistPlayer = PlayListPlayer.SingletonPlayer;
    PlayList pl = playlistPlayer.GetPlaylist(PlayListType.Video);
    playlistPlayer.CurrentPlaylistType = PlayListType.Video;

    (I typed this manually so needs checking ;))
     

    Users who are viewing this thread

    Top Bottom