diff options
author | elupus <elupus@xbmc.org> | 2011-07-16 13:40:05 +0200 |
---|---|---|
committer | elupus <elupus@xbmc.org> | 2011-07-16 13:40:05 +0200 |
commit | 44fe23d423682b131d2e81cad919435eefd88dd2 (patch) | |
tree | 936928a12d3499d128c2371b5cc86c2055dc3297 | |
parent | 372c6e8ab47788394a71d283f87b82edfa7b0b71 (diff) |
fixed: avoid toasting when playlist ends during automatic playback
This make CPlayListPlayer::PlayNext's bAutoPlay param
signal if this was a manual or automatic action instead
of passing it as a restart param to playfile. It's
not used anywhere anyhow.
-rw-r--r-- | xbmc/Application.cpp | 5 | ||||
-rw-r--r-- | xbmc/PlayListPlayer.cpp | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp index 8d305cff15..42af390886 100644 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -4509,10 +4509,7 @@ bool CApplication::OnMessage(CGUIMessage& message) if (message.GetMessage() == GUI_MSG_PLAYBACK_ENDED) { - // sending true to PlayNext() effectively passes bRestart to PlayFile() - // which is not generally what we want (except for stacks, which are - // handled above) - g_playlistPlayer.PlayNext(); + g_playlistPlayer.PlayNext(1, true); } else { diff --git a/xbmc/PlayListPlayer.cpp b/xbmc/PlayListPlayer.cpp index 2af26aac92..2e49f9c64d 100644 --- a/xbmc/PlayListPlayer.cpp +++ b/xbmc/PlayListPlayer.cpp @@ -160,11 +160,13 @@ bool CPlayListPlayer::PlayNext(int offset, bool bAutoPlay) if ((iSong < 0) || (iSong >= playlist.size()) || (playlist.GetPlayable() <= 0)) { - CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(559), g_localizeStrings.Get(34201)); + if(!bAutoPlay) + CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(559), g_localizeStrings.Get(34201)); + return false; } - return Play(iSong, bAutoPlay); + return Play(iSong, false); } bool CPlayListPlayer::PlayPrevious() |