fix database update

This commit is contained in:
Andrzej Rybczak
2009-06-29 02:19:40 +02:00
parent c4d88133bd
commit ff3e90d91d
2 changed files with 19 additions and 11 deletions

View File

@@ -160,7 +160,7 @@ void Connection::UpdateStatus()
{
itsChanges.Playlist = 1;
itsChanges.SongID = 1;
itsChanges.Database = 0;
itsChanges.Database = 1;
itsChanges.DBUpdating = 1;
itsChanges.Volume = 1;
itsChanges.ElapsedTime = 1;

View File

@@ -282,11 +282,17 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
}
if (changed.Database)
{
if (myBrowser->Main())
myBrowser->GetDirectory(myBrowser->CurrentDir());
# ifdef HAVE_TAGLIB_H
if (myTagEditor->Main())
{
myTagEditor->Albums->Clear(0);
myTagEditor->Dirs->Clear(0);
}
# endif // HAVE_TAGLIB_H
if (myLibrary->Main())
{
if (myLibrary->Columns() == 2)
{
myLibrary->Albums->Clear();
@@ -294,6 +300,8 @@ void NcmpcppStatusChanged(Connection *Mpd, StatusChanges changed, void *)
}
else
myLibrary->Artists->Clear(0);
}
if (myPlaylistEditor->Main())
myPlaylistEditor->Content->Clear(0);
}
if (changed.PlayerState)