diff --git a/src/media_library.cpp b/src/media_library.cpp index 8924d178..73c6d68e 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -162,7 +162,6 @@ void MediaLibrary::Update() { TagList list; Albums->Clear(); - Songs->Clear(); Mpd.GetList(list, Config.media_lib_primary_tag); sort(list.begin(), list.end(), CaseInsensitiveSorting()); for (TagList::iterator it = list.begin(); it != list.end(); ++it) @@ -177,8 +176,9 @@ void MediaLibrary::Update() Artists->Refresh(); } - if (!hasTwoColumns && !Artists->Empty() && Albums->Empty() && Songs->Empty()) + if (!hasTwoColumns && !Artists->Empty() && Albums->Empty()) { + Songs->Clear(); Albums->Reset(); TagList list; locale_to_utf(Artists->Current()); @@ -226,8 +226,9 @@ void MediaLibrary::Update() Albums->Sort((*Albums)[0].first == ""); Albums->Refresh(); } - else if (hasTwoColumns && Albums->Empty() && Songs->Empty()) + else if (hasTwoColumns && Albums->Empty()) { + Songs->Clear(); TagList artists; *Albums << XY(0, 0) << "Fetching albums..."; Albums->Window::Refresh(); @@ -280,7 +281,6 @@ void MediaLibrary::Update() Songs->Reset(); SongList list; - Songs->Clear(); Mpd.StartSearch(1); Mpd.AddSearch(Config.media_lib_primary_tag, hasTwoColumns ? Albums->Current().second.Artist : locale_to_utf_cpy(Artists->Current())); if (Albums->Empty()) // left for compatibility with ActiveWindow() == myLibrary->Artists) { myLibrary->Albums->Clear(); - myLibrary->Songs->Clear(); } else if (myScreen->ActiveWindow() == myLibrary->Albums) { @@ -452,7 +451,6 @@ int main(int argc, char *argv[]) else if (myScreen->ActiveWindow() == myTagEditor->LeftColumn) { myTagEditor->Tags->Clear(); - myTagEditor->TagTypes->Refresh(); } # endif // HAVE_TAGLIB_H } diff --git a/src/status.cpp b/src/status.cpp index 60090264..71408206 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -292,10 +292,7 @@ void NcmpcppStatusChanged(Connection *, StatusChanges changed, void *) if (myLibrary->Main()) { if (myLibrary->Columns() == 2) - { myLibrary->Albums->Clear(); - myLibrary->Songs->Clear(); - } else myLibrary->Artists->Clear(); }