fix compilation --without-curl
This commit is contained in:
27
src/info.cpp
27
src/info.cpp
@@ -45,12 +45,13 @@ const string artists_folder = home_folder + "/.ncmpcpp/artists";
|
||||
|
||||
namespace
|
||||
{
|
||||
# ifdef HAVE_CURL_CURL_H
|
||||
pthread_t artist_info_downloader;
|
||||
bool artist_info_ready = 0;
|
||||
|
||||
# ifdef HAVE_CURL_CURL_H
|
||||
void *GetArtistInfo(void *);
|
||||
# endif
|
||||
|
||||
void GetSongInfo(MPD::Song &, Scrollpad &);
|
||||
const basic_buffer<my_char_t> &ShowTagInInfoScreen(const string &);
|
||||
}
|
||||
@@ -66,17 +67,6 @@ void Info::Resize()
|
||||
sInfo->Resize(COLS, main_height);
|
||||
}
|
||||
|
||||
bool Info::Ready()
|
||||
{
|
||||
if (!artist_info_ready)
|
||||
return false;
|
||||
pthread_join(artist_info_downloader, NULL);
|
||||
sInfo->Flush();
|
||||
artist_info_downloader = 0;
|
||||
artist_info_ready = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Info::GetSong()
|
||||
{
|
||||
if (wCurrent == sInfo)
|
||||
@@ -152,6 +142,18 @@ void Info::GetSong()
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_CURL_CURL_H
|
||||
bool Info::Ready()
|
||||
{
|
||||
if (!artist_info_ready)
|
||||
return false;
|
||||
pthread_join(artist_info_downloader, NULL);
|
||||
sInfo->Flush();
|
||||
artist_info_downloader = 0;
|
||||
artist_info_ready = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void Info::GetArtist()
|
||||
{
|
||||
if (wCurrent == sInfo)
|
||||
@@ -241,6 +243,7 @@ void Info::GetArtist()
|
||||
delete artist;
|
||||
}
|
||||
}
|
||||
#endif // HVAE_CURL_CURL_H
|
||||
|
||||
namespace {
|
||||
#ifdef HAVE_CURL_CURL_H
|
||||
|
||||
Reference in New Issue
Block a user