/* * Permanently removes a stored playlist. * * Returns true on success, false on failure. */ bool Control::delete_playlist(string name) { EXIT_IDLE; pms->log(MSG_DEBUG, 0, "Deleting the playlist '%s'\n", name.c_str()); return mpd_run_rm(conn->h(), name.c_str()); }
/* * pgmpc_rm * Delete given playlist. */ Datum pgmpc_rm(PG_FUNCTION_ARGS) { char *playlist; /* User needs to specify a playlist */ if (PG_ARGISNULL(0)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("Playlist needs to be specified"))); /* get playlist value */ playlist = text_to_cstring(PG_GETARG_TEXT_PP(0)); /* Now run the command */ pgmpc_init(); if (!mpd_run_rm(mpd_conn, playlist)) pgmpc_print_error(); pgmpc_reset(); PG_RETURN_VOID(); }
void Connection::DeletePlaylist(const std::string &name) { prechecksNoCommandsList(); mpd_run_rm(m_connection.get(), name.c_str()); checkErrors(); }