browser: properly handle deletion of mpd playlists
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user