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