browser: properly handle deletion of mpd playlists

This commit is contained in:
Andrzej Rybczak
2014-10-04 17:50:14 +02:00
parent af3a666915
commit 9e11ffc351

View File

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