browser: properly handle deletion of mpd playlists

master
Andrzej Rybczak 12 years ago
parent af3a666915
commit 9e11ffc351
  1. 12
      src/browser.cpp

@ -563,8 +563,16 @@ bool Browser::deleteItem(const MPD::Item &item, std::string &errmsg)
// playlist created by mpd
if (!isLocal() && item.type == itPlaylist && CurrentDir() == "/")
{
Mpd.DeletePlaylist(item.name);
return true;
try
{
Mpd.DeletePlaylist(item.name);
return true;
}
catch (MPD::ServerError &e)
{
if (e.code() != MPD_SERVER_ERROR_NO_EXIST)
throw;
}
}
std::string path;

Loading…
Cancel
Save