request som changes in PlaylistPlayer (1 Viewer)

MrSensitive

Portal Pro
May 18, 2004
239
0
Belgium
please see this thred for history
http://nolanparty.com/mediaportal.sourceforge.net/phpBB2/viewtopic.php?t=10250

I solved this problem using a GUIMessage
I created a new message and added the following code to PlayListPlayer.cs:
in the OnMessage EventHandler:
Code:
case GUIMessage.MessageType.GUI_MSG_PLAYLIST_START:
				{
					Play(1);
				}
					break;

this allows me to circumvent the newly created instance of playlistplayer, and lets me execute the Play Method in the main thread.

I can use the following code in my MPBlue plugin:

Code:
public int PlayAlbum(int AlbumID)
		{
			try
			{
				//Get all tracks from the album and initialize the playlistplayer?
				PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Clear();
				PlayListPlayer.CurrentPlaylist = PlayListPlayer.PlayListType.PLAYLIST_MUSIC;
				PlayList.PlayListItem playlistItem = new PlayList.PlayListItem();
		
				playlistItem.Type = PlayList.PlayListItem.PlayListItemType.Audio;
				playlistItem.FileName = @"M:\my Albums\Bjork - Homogenic\04 Bachelorette.mp3";
				playlistItem.Description = "testing, testin 123";
				playlistItem.Duration = 23;
				PlayListPlayer.GetPlaylist(PlayListPlayer.PlayListType.PLAYLIST_MUSIC).Add(playlistItem);

				GUIMessage msg=new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAYLIST_START,0,0,0,0,0,null);
				GUIWindowManager.SendThreadMessage(msg);
				return 1;
			}
			catch(Exception e)
			{
				string caption = e.ToString();
				return 1;
			}
		}


How do I submit this modification?
 

MrSensitive

Portal Pro
May 18, 2004
239
0
Belgium
sheez, not a lot of interest apparently.. :?

never mind, I can probably imlement the changes in the plugin only..

Anyway, Yesterday I could select Artists and albums using my PocketPC and play them... 8)
 

mzemina

Retired Team Member
  • Premium Supporter
  • February 23, 2005
    2,065
    14
    Tulsa, OK
    Home Country
    United States of America United States of America
    I thing too many haven't got as far with the current code base as you have. Maybe :?:

    Anyway - I say submit a patch for the code. Have you gotten on IRC to ask the developers who frequent it? I've heard that is where they tend to hang out (more than the forums here) and you may get a better response.

    Please keep plugging (no pun intended) away. I look forward to your functioning PocketPC addition to MediaPortal!

    Mike
     

    MrSensitive

    Portal Pro
    May 18, 2004
    239
    0
    Belgium
    Hi mzemina,

    thanks for your reply..

    In the mean time i found a workaround, so a patch is not required..

    i created my on GUIMessage class that inherits from the main class.
    and use this on in my plugin..

    works like a charm..

    I had some issues with MP last night, so i was unable to build a testversion, will try on tonight..
     

    Users who are viewing this thread

    Top Bottom