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

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