void CGUIWindowMusicPlaylistEditor::LoadPlaylist(const CStdString &playlist) { if (playlist.Equals("newplaylist://")) { ClearPlaylist(); m_strLoadedPlaylist.clear(); return; } XFILE::CPlaylistFileDirectory dir; CFileItemList items; if (dir.GetDirectory(playlist, items)) { ClearPlaylist(); AppendToPlaylist(items); m_strLoadedPlaylist = playlist; } }
void CGUIWindowMusicPlaylistEditor::LoadPlaylist(const std::string &playlist) { const CURL pathToUrl(playlist); if (pathToUrl.IsProtocol("newplaylist")) { ClearPlaylist(); m_strLoadedPlaylist.clear(); return; } XFILE::CPlaylistFileDirectory dir; CFileItemList items; if (dir.GetDirectory(pathToUrl, items)) { ClearPlaylist(); AppendToPlaylist(items); m_strLoadedPlaylist = playlist; } }