fix switching to artist info screen
if one switched from artist info screen while artist info was being
downloaded, {s,}he wouldn't be able to enter the screen again.
This commit is contained in:
@@ -214,7 +214,7 @@ void Lastfm::Refetch()
|
|||||||
|
|
||||||
bool Lastfm::SetArtistInfoArgs(const std::string &artist, const std::string &lang)
|
bool Lastfm::SetArtistInfoArgs(const std::string &artist, const std::string &lang)
|
||||||
{
|
{
|
||||||
if (isDownloadInProgress)
|
if (isDownloading())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
itsService.reset(new ArtistInfo);
|
itsService.reset(new ArtistInfo);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class Lastfm : public Screen<Scrollpad>
|
|||||||
|
|
||||||
void Refetch();
|
void Refetch();
|
||||||
|
|
||||||
|
bool isDownloading() { return isDownloadInProgress && !isReadyToTake; }
|
||||||
bool SetArtistInfoArgs(const std::string &artist, const std::string &lang = "");
|
bool SetArtistInfoArgs(const std::string &artist, const std::string &lang = "");
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -2142,7 +2142,7 @@ int main(int argc, char *argv[])
|
|||||||
# ifdef HAVE_CURL_CURL_H
|
# ifdef HAVE_CURL_CURL_H
|
||||||
else if (Keypressed(input, Key.ArtistInfo))
|
else if (Keypressed(input, Key.ArtistInfo))
|
||||||
{
|
{
|
||||||
if (myScreen == myLastfm)
|
if (myScreen == myLastfm || myLastfm->isDownloading())
|
||||||
{
|
{
|
||||||
myLastfm->SwitchTo();
|
myLastfm->SwitchTo();
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user