case TMSG_MEDIA_STOP:
{
// restore to previous window if needed
- if (g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW ||
- g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO ||
- g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION)
+ bool stopSlideshow = true;
+ bool stopVideo = true;
+ bool stopMusic = true;
+ if (pMsg->dwParam1 >= 0)
+ {
+ stopSlideshow = (pMsg->dwParam1 == PLAYLIST_PICTURE);
+ stopVideo = (pMsg->dwParam1 == PLAYLIST_VIDEO);
+ stopMusic = (pMsg->dwParam1 == PLAYLIST_MUSIC);
+ }
+
+ if ((stopSlideshow && g_windowManager.GetActiveWindow() == WINDOW_SLIDESHOW) ||
+ (stopVideo && g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO) ||
+ (stopMusic && g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION))
g_windowManager.PreviousWindow();
g_application.ResetScreenSaver();
SendMessage(tMsg, false);
}
-void CApplicationMessenger::MediaStop(bool bWait /* = true */)
+void CApplicationMessenger::MediaStop(bool bWait /* = true */, int playlistid /* = -1 */)
{
ThreadMessage tMsg = {TMSG_MEDIA_STOP};
+ tMsg.dwParam1 = playlistid;
SendMessage(tMsg, bWait);
}
void MediaPlay(const CFileItem &item);
void MediaPlay(const CFileItemList &item, int song = 0);
void MediaPlay(int playlistid, int song = -1);
- void MediaStop(bool bWait = true);
+ void MediaStop(bool bWait = true, int playlistid = -1);
void MediaPause();
void MediaRestart(bool bWait);