lyrics fetcher: add support for genius.com

master
Andrzej Rybczak 9 years ago
parent dac0d4602f
commit 308c2be2f6
  1. 1
      NEWS
  2. 1
      src/lyrics_fetcher.cpp
  3. 8
      src/lyrics_fetcher.h

@ -4,6 +4,7 @@ ncmpcpp-0.8 (????-??-??)
* Support for filtering of lists was brought back from the dead.
* Require C++14 compatible compiler during compilation.
* Lyrics from files containing DOS line endings now load properly on Linux.
* Added support for fetching lyrics from genius.com.
ncmpcpp-0.7.7 (2016-10-31)
* Fixed compilation on 32bit platforms.

@ -39,6 +39,7 @@
LyricsFetcher *lyricsPlugins[] =
{
new LyricwikiFetcher(),
new GeniusLyricsFetcher(),
new AzLyricsFetcher(),
new Sing365Fetcher(),
new LyricsmaniaFetcher(),

@ -116,6 +116,14 @@ protected:
virtual const char *regex() const override { return "<div class=\"lyricsh\">.*?</h2>.*<div>(.*?)</div>"; }
};
struct GeniusLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() const override { return "genius.com"; }
protected:
virtual const char *regex() const override { return "<lyrics.*?>(.*?)</lyrics>"; }
};
struct InternetLyricsFetcher : public GoogleLyricsFetcher
{
virtual const char *name() const override { return "the Internet"; }

Loading…
Cancel
Save