diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp old mode 100644 new mode 100755 index f277ed8c0f8cb..0594e9441eec5 --- a/xbmc/Application.cpp +++ b/xbmc/Application.cpp @@ -3334,6 +3334,14 @@ void CApplication::Stop(int exitCode) bool CApplication::PlayMedia(const CFileItem& item, int iPlaylist) { + //If item is a plugin, expand out now and run ourselves again + if (item.IsPlugin()) + { + CFileItem item_new(item); + if (XFILE::CPluginDirectory::GetPluginResult(item.GetPath(), item_new)) + return PlayMedia(item_new, iPlaylist); + return false; + } if (item.IsLastFM()) { g_partyModeManager.Disable(); diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp old mode 100644 new mode 100755 index 8785ad1315413..aaf72276a279d --- a/xbmc/ApplicationMessenger.cpp +++ b/xbmc/ApplicationMessenger.cpp @@ -314,10 +314,17 @@ case TMSG_POWERDOWN: } } - g_playlistPlayer.ClearPlaylist(playlist); - g_playlistPlayer.Add(playlist, (*list)); - g_playlistPlayer.SetCurrentPlaylist(playlist); - g_playlistPlayer.Play(pMsg->dwParam1); + //For single item lists try PlayMedia. This covers some more cases where a playlist is not appropriate + //It will fall through to PlayFile + if (list->Size() == 1 && !(*list)[0]->IsPlayList()) + g_application.PlayMedia(*((*list)[0]), playlist); + else + { + g_playlistPlayer.ClearPlaylist(playlist); + g_playlistPlayer.Add(playlist, (*list)); + g_playlistPlayer.SetCurrentPlaylist(playlist); + g_playlistPlayer.Play(pMsg->dwParam1); + } } delete list;