invoke callback immediately after sending update command succesfully

This commit is contained in:
Andrzej Rybczak
2009-03-22 20:01:39 +01:00
parent ab265f2fdf
commit 9270a83a78
2 changed files with 5 additions and 1 deletions

View File

@@ -192,7 +192,12 @@ void Connection::UpdateDirectory(const string &path)
mpd_sendUpdateCommand(itsConnection, path.c_str()); mpd_sendUpdateCommand(itsConnection, path.c_str());
mpd_finishCommand(itsConnection); mpd_finishCommand(itsConnection);
if (!itsConnection->error) if (!itsConnection->error)
{
itsCurrentStatus->updatingDb = 1; itsCurrentStatus->updatingDb = 1;
StatusChanges ch;
ch.DBUpdating = 1;
itsUpdater(this, ch, itsErrorHandlerUserdata);
}
} }
} }

View File

@@ -1061,7 +1061,6 @@ int main(int argc, char *argv[])
# endif // HAVE_TAGLIB_H # endif // HAVE_TAGLIB_H
else else
Mpd->UpdateDirectory("/"); Mpd->UpdateDirectory("/");
Mpd->UpdateStatus();
} }
else if (Keypressed(input, Key.GoToNowPlaying)) else if (Keypressed(input, Key.GoToNowPlaying))
{ {