Optimize deletion/cropping of main playlist by using ranges

This commit is contained in:
Andrzej Rybczak
2020-12-20 00:49:21 +01:00
parent b68354a223
commit ab27472b0b
5 changed files with 41 additions and 3 deletions

View File

@@ -655,6 +655,17 @@ void Connection::Delete(unsigned pos)
}
}
void Connection::DeleteRange(unsigned begin, unsigned end)
{
prechecks();
mpd_send_delete_range(m_connection.get(), begin, end);
if (!m_command_list_active)
{
mpd_response_finish(m_connection.get());
checkErrors();
}
}
void Connection::PlaylistDelete(const std::string &playlist, unsigned pos)
{
prechecks();