get info about state of new connection after reconecting with idle mode active

This commit is contained in:
Andrzej Rybczak
2010-03-25 00:26:48 +01:00
parent 3b39d417a1
commit 37c7acfd3c

View File

@@ -335,7 +335,13 @@ int main(int argc, char *argv[])
{ {
ShowMessage("Connected to %s!", Mpd.GetHostname().c_str()); ShowMessage("Connected to %s!", Mpd.GetHostname().c_str());
if (Mpd.SupportsIdle()) if (Mpd.SupportsIdle())
{
wFooter->AddFDCallback(Mpd.GetFD(), StatusbarMPDCallback); wFooter->AddFDCallback(Mpd.GetFD(), StatusbarMPDCallback);
Mpd.OrderDataFetching(); // we need info about new connection
}
// we want everything updated after reconnect, no blocking.
Playlist::BlockUpdate = 0;
Global::BlockItemListUpdate = 0;
MessagesAllowed = 0; MessagesAllowed = 0;
UpdateStatusImmediately = 1; UpdateStatusImmediately = 1;
# ifdef ENABLE_VISUALIZER # ifdef ENABLE_VISUALIZER