void CGUIWindowMusicPlaylistEditor::OnSavePlaylist()
{
  // saves playlist to the playlist folder
  CStdString name = URIUtils::GetFileName(m_strLoadedPlaylist);
  URIUtils::RemoveExtension(name);

  if (CGUIKeyboardFactory::ShowAndGetInput(name, g_localizeStrings.Get(16012), false))
  { // save playlist as an .m3u
    PLAYLIST::CPlayListM3U playlist;
    playlist.Add(*m_playlist);
    CStdString strBase = URIUtils::AddFileToFolder(CSettings::Get().GetString("system.playlistspath"), "music");
    CStdString path = URIUtils::AddFileToFolder(strBase, name + ".m3u");
    playlist.Save(path);
    m_strLoadedPlaylist = name;
  }
}
void CGUIWindowMusicPlaylistEditor::OnSavePlaylist()
{
    // saves playlist to the playlist folder
    CStdString name = CUtil::GetFileName(m_strLoadedPlaylist);
    CStdString strExt = CUtil::GetExtension(name);
    name = name.Mid(0,name.size()-strExt.size());
    if (CGUIDialogKeyboard::ShowAndGetInput(name, g_localizeStrings.Get(16012), false))
    {   // save playlist as an .m3u
        PLAYLIST::CPlayListM3U playlist;
        playlist.Add(*m_playlist);
        CStdString path, strBase;
        CUtil::AddFileToFolder(g_guiSettings.GetString("system.playlistspath"), "music", strBase);
        CUtil::AddFileToFolder(strBase, name + ".m3u", path);
        playlist.Save(path);
        m_strLoadedPlaylist = name;
    }
}
void CGUIWindowMusicPlaylistEditor::OnSavePlaylist()
{
  // saves playlist to the playlist folder
  std::string name = URIUtils::GetFileName(m_strLoadedPlaylist);
  URIUtils::RemoveExtension(name);

  if (CGUIKeyboardFactory::ShowAndGetInput(name, CVariant{g_localizeStrings.Get(16012)}, false))
  { // save playlist as an .m3u
    PLAYLIST::CPlayListM3U playlist;
    playlist.Add(*m_playlist);
    std::string path = URIUtils::AddFileToFolder(
      CServiceBroker::GetSettings().GetString(CSettings::SETTING_SYSTEM_PLAYLISTSPATH),
      "music",
      name + ".m3u");

    playlist.Save(path);
    m_strLoadedPlaylist = name;
  }
}