/// <summary>
 /// Show the details page of a movingpictures movie
 /// </summary>
 /// <param name="_movieId">id of movie</param>
 internal static void ShowMovieDetails(int _movieId)
 {
     if (_movieId > 0)
     {
         WindowPluginHelper.ActivateWindow(96742, "movieid:" + _movieId.ToString());
     }
 }
 /// <summary>
 /// Show series details
 /// </summary>
 /// <param name="seriesId">Id of series</param>
 internal static void ShowSeriesDetails(int seriesId)
 {
     if (seriesId > 0)
     {
         WindowPluginHelper.ActivateWindow(9811, "seriesid:" + seriesId.ToString());
     }
 }
 /// <summary>
 /// Show season details
 /// </summary>
 /// <param name="seriesId">Id of series</param>
 /// <param name="seasonId">Id of season</param>
 internal static void ShowSeasonDetails(int seriesId, int seasonId)
 {
     if (seriesId > 0)
     {
         WindowPluginHelper.ActivateWindow(9811, "seriesid:" + seriesId + "|seasonidx:" + seasonId);
     }
 }
        /// <summary>
        /// Private method to start playlist (needed for the invoke callback)
        /// </summary>
        private static void StartPlayingPlaylist(bool switchToPlaylistView)
        {
            if (GUIGraphicsContext.form.InvokeRequired)
            {
                StartPlayingPlaylistDelegate d = StartPlayingPlaylist;
                GUIGraphicsContext.form.Invoke(d, new object[] { switchToPlaylistView });
            }
            else
            {
                PlayListPlayer playlistPlayer = PlayListPlayer.SingletonPlayer;
                PlayList       playlist       = playlistPlayer.GetPlaylist(mPlaylistStartType);
                // if we got a playlist
                if (playlist.Count > 0)
                {
                    // and activate the playlist window if its not activated yet
                    if (switchToPlaylistView)
                    {
                        if (mPlaylistStartType == PlayListType.PLAYLIST_MUSIC)
                        {
                            WindowPluginHelper.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_MUSIC_PLAYLIST);
                        }
                        else if (mPlaylistStartType == PlayListType.PLAYLIST_VIDEO)
                        {
                            WindowPluginHelper.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_VIDEO_PLAYLIST);
                        }
                    }

                    // and start playing it
                    playlistPlayer.CurrentPlaylistType = mPlaylistStartType;
                    playlistPlayer.Reset();
                    playlistPlayer.Play(mPlaylistStartIndex);
                }
            }
        }
 /// <summary>
 /// refresh the playlist window if it's currently active, so the newly added items will show
 /// </summary>
 public static void RefreshPlaylistIfVisible()
 {
     if (GUIWindowManager.ActiveWindow == (int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_VIDEO_PLAYLIST)
     {
         WindowPluginHelper.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_VIDEO_PLAYLIST);
     }
     else if (GUIWindowManager.ActiveWindow == (int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_MUSIC_PLAYLIST)
     {
         WindowPluginHelper.ActivateWindow((int)MediaPortal.GUI.Library.GUIWindow.Window.WINDOW_MUSIC_PLAYLIST);
     }
 }