Skip to content

Commit

Permalink
Merge pull request xbmc#17123 from a1rwulf/fix-playlistplayer
Browse files Browse the repository at this point in the history
Reset playlist on new file playback
  • Loading branch information
arnova authored and Maven85 committed Jan 21, 2020
1 parent 9c3afa0 commit 7fa4dda
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xbmc/PlayListPlayer.cpp
Expand Up @@ -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<CFileItem*>(pMsg->lpVoid);
g_application.PlayFile(*item, "", pMsg->param1 != 0);
delete item;
Expand Down

0 comments on commit 7fa4dda

Please sign in to comment.