Fix keymap.
[vuplus_xbmc] / xbmc / PlayListPlayer.cpp
index ba3ee20..fb2b920 100644 (file)
@@ -30,6 +30,7 @@
 #include "playlists/PlayList.h"
 #include "utils/log.h"
 #include "utils/TimeUtils.h"
+#include "utils/StringUtils.h"
 #include "music/tags/MusicInfoTag.h"
 #include "dialogs/GUIDialogKaiToast.h"
 #include "guilib/LocalizeStrings.h"
@@ -377,7 +378,7 @@ void CPlayListPlayer::SetCurrentPlaylist(int iPlaylist)
 void CPlayListPlayer::ClearPlaylist(int iPlaylist)
 {
   // clear our applications playlist file
-  g_application.m_strPlayListFile.Empty();
+  g_application.m_strPlayListFile.clear();
 
   CPlayList& playlist = GetPlaylist(iPlaylist);
   playlist.Clear();
@@ -485,8 +486,7 @@ void CPlayListPlayer::SetShuffle(int iPlaylist, bool bYesNo, bool bNotify /* = f
 
     if (bNotify)
     {
-      CStdString shuffleStr;
-      shuffleStr.Format("%s: %s", g_localizeStrings.Get(191), g_localizeStrings.Get(bYesNo ? 593 : 591)); // Shuffle: All/Off
+      CStdString shuffleStr = StringUtils::Format("%s: %s", g_localizeStrings.Get(191).c_str(), g_localizeStrings.Get(bYesNo ? 593 : 591).c_str()); // Shuffle: All/Off
       CGUIDialogKaiToast::QueueNotification(CGUIDialogKaiToast::Info, g_localizeStrings.Get(559),  shuffleStr);
     }
 
@@ -576,8 +576,8 @@ void CPlayListPlayer::ReShuffle(int iPlaylist, int iPosition)
   else if (iPlaylist == m_iCurrentPlayList)
   {
     if (
-      (g_application.IsPlayingAudio() && iPlaylist == PLAYLIST_MUSIC) ||
-      (g_application.IsPlayingVideo() && iPlaylist == PLAYLIST_VIDEO)
+      (g_application.m_pPlayer->IsPlayingAudio() && iPlaylist == PLAYLIST_MUSIC) ||
+      (g_application.m_pPlayer->IsPlayingVideo() && iPlaylist == PLAYLIST_VIDEO)
       )
     {
       g_playlistPlayer.GetPlaylist(iPlaylist).Shuffle(m_iCurrentSong + 2);
@@ -709,8 +709,8 @@ void CPlayListPlayer::Swap(int iPlaylist, int indexItem1, int indexItem2)
 void CPlayListPlayer::AnnouncePropertyChanged(int iPlaylist, const std::string &strProperty, const CVariant &value)
 {
   if (strProperty.empty() || value.isNull() ||
-     (iPlaylist == PLAYLIST_VIDEO && !g_application.IsPlayingVideo()) ||
-     (iPlaylist == PLAYLIST_MUSIC && !g_application.IsPlayingAudio()))
+     (iPlaylist == PLAYLIST_VIDEO && !g_application.m_pPlayer->IsPlayingVideo()) ||
+     (iPlaylist == PLAYLIST_MUSIC && !g_application.m_pPlayer->IsPlayingAudio()))
     return;
 
   CVariant data;