do not store commands list in MPD::Connection
it should have sent commandlist begin and end commands from the beginning, having separated functions just to handle queueing commands was plainly ugly.
This commit is contained in:
@@ -268,16 +268,17 @@ void SearchEngine::SpacePressed()
|
||||
{
|
||||
Playlist::BlockUpdate = 1;
|
||||
long long hash = w->Current().second->GetHash();
|
||||
Mpd->StartCommandsList();
|
||||
for (size_t i = 0; i < myPlaylist->Main()->Size(); i++)
|
||||
{
|
||||
if (myPlaylist->Main()->at(i).GetHash() == hash)
|
||||
{
|
||||
Mpd->QueueDeleteSong(i);
|
||||
Mpd->Delete(i);
|
||||
myPlaylist->Main()->DeleteOption(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
Mpd->CommitQueue();
|
||||
Mpd->CommitCommandsList();
|
||||
w->BoldOption(w->Choice(), 0);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user