new feature: support for fetching lyrics for currently playing song in background

This commit is contained in:
Andrzej Rybczak
2011-10-18 23:15:32 +02:00
parent 1ccca56da3
commit d9bc1c0950
11 changed files with 130 additions and 33 deletions

View File

@@ -401,6 +401,11 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::StatusChanges changed, void *)
if (!Config.execute_on_song_change.empty())
system(Config.execute_on_song_change.c_str());
# ifdef HAVE_CURL_CURL_H
if (Config.fetch_lyrics_in_background)
Lyrics::DownloadInBackground(myPlaylist->NowPlayingSong());
# endif // HAVE_CURL_CURL_H
if (Mpd.isPlaying() && !(np = Mpd.GetCurrentSong()).Empty())
WindowTitle(utf_to_locale_cpy(np.toString(Config.song_window_title_format)));