From 1b98b02659c5177022d6a4b5a9fe8efe52640a43 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Mon, 16 Aug 2010 15:12:48 +0200 Subject: [PATCH] fix 'media library: fix filter issues' --- src/media_library.cpp | 6 +++--- src/ncmpcpp.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/media_library.cpp b/src/media_library.cpp index 9976bdf7..d0c563aa 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -201,7 +201,7 @@ void MediaLibrary::Update() Artists->Refresh(); } - if (!hasTwoColumns && !Artists->ReallyEmpty() && Albums->ReallyEmpty() && Songs->ReallyEmpty()) + if (!hasTwoColumns && !Artists->Empty() && Albums->ReallyEmpty() && Songs->ReallyEmpty()) { // idle has to be blocked for now since it would be enabled and // disabled a few times by each mpd command, which makes no sense @@ -303,14 +303,14 @@ void MediaLibrary::Update() Albums->Refresh(); } - if (!hasTwoColumns && !Artists->ReallyEmpty() && w == Albums && Albums->ReallyEmpty()) + if (!hasTwoColumns && !Artists->Empty() && w == Albums && Albums->ReallyEmpty()) { Albums->HighlightColor(Config.main_highlight_color); Artists->HighlightColor(Config.active_column_color); w = Artists; } - if (!(hasTwoColumns ? Albums->ReallyEmpty() : Artists->ReallyEmpty()) && Songs->ReallyEmpty()) + if (!(hasTwoColumns ? Albums->Empty() : Artists->Empty()) && Songs->ReallyEmpty()) { Songs->Reset(); MPD::SongList list; diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 0c3b7113..0ce05153 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -2089,7 +2089,7 @@ int main(int argc, char *argv[]) if (s) artist = s->GetArtist(); - else if (myScreen == myLibrary && myLibrary->Main() == myLibrary->Artists) + else if (myScreen == myLibrary && myLibrary->Main() == myLibrary->Artists && !myLibrary->Artists->Empty()) artist = myLibrary->Artists->Current(); if (!artist.empty() && myLastfm->SetArtistInfoArgs(artist, Config.lastfm_preferred_language))