diff --git a/src/lastfm.cpp b/src/lastfm.cpp index c8e1f730..1b5a02f7 100644 --- a/src/lastfm.cpp +++ b/src/lastfm.cpp @@ -214,7 +214,7 @@ void Lastfm::Refetch() bool Lastfm::SetArtistInfoArgs(const std::string &artist, const std::string &lang) { - if (isDownloadInProgress) + if (isDownloading()) return false; itsService.reset(new ArtistInfo); diff --git a/src/lastfm.h b/src/lastfm.h index d93c449f..4cccaa81 100644 --- a/src/lastfm.h +++ b/src/lastfm.h @@ -53,6 +53,7 @@ class Lastfm : public Screen void Refetch(); + bool isDownloading() { return isDownloadInProgress && !isReadyToTake; } bool SetArtistInfoArgs(const std::string &artist, const std::string &lang = ""); protected: diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index ade5cefb..0657eaeb 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -2142,7 +2142,7 @@ int main(int argc, char *argv[]) # ifdef HAVE_CURL_CURL_H else if (Keypressed(input, Key.ArtistInfo)) { - if (myScreen == myLastfm) + if (myScreen == myLastfm || myLastfm->isDownloading()) { myLastfm->SwitchTo(); continue;