From 7fa4dda3d0bb36db50dc17fe7cdf54c11a4b7656 Mon Sep 17 00:00:00 2001 From: Arno van Amersfoort Date: Mon, 6 Jan 2020 16:16:48 +0100 Subject: [PATCH] Merge pull request #17123 from a1rwulf/fix-playlistplayer Reset playlist on new file playback --- xbmc/PlayListPlayer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index 5d24ccc44f5b4..6e89d59e4c8dd 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -863,6 +863,10 @@ void PLAYLIST::CPlayListPlayer::OnApplicationMessage(KODI::MESSAGING::ThreadMess // first check if we were called from the PlayFile() function if (pMsg->lpVoid && pMsg->param2 == 0) { + // Discard the current playlist, if TMSG_MEDIA_PLAY gets posted with just a single item. + // Otherwise items may fail to play, when started while a playlist is playing. + Reset(); + CFileItem *item = static_cast(pMsg->lpVoid); g_application.PlayFile(*item, "", pMsg->param1 != 0); delete item;