private void FoundLyrics(string lyrics) { // write out lyrics SaveLyricsFile(_song, lyrics); _lastLyrics = lyrics; if (LyricsFound != null) { var e = new LyricsFoundEventArgs(lyrics); LyricsFound(this, e); } }
public void LoadLyrics(ThreePM.MusicPlayer.SongInfo song, bool skipTextFile, bool onlyTextFile, bool skipOtherSongsInDatabase) { if (song.FileName.StartsWith("http://", StringComparison.OrdinalIgnoreCase) && string.IsNullOrEmpty(song.Title) && string.IsNullOrEmpty(song.Artist)) { _lastLyrics = ""; if (LyricsFound != null) { var e = new LyricsFoundEventArgs(""); LyricsFound(this, e); } return; } _currentLyricsObject = 0; _song = song; if (onlyTextFile) { if (!CheckForLyricsTextFile()) { LyricsNotFound?.Invoke(this, EventArgs.Empty); } return; } // check for other songs in the DB if (!skipOtherSongsInDatabase && CheckForLyricsFromDatabase()) { return; } if (skipTextFile || CheckForLyricsTextFile() == false) { SearchCurrentLyricsSite(); } }
private void Helper_LyricsFound(object sender, LyricsFoundEventArgs e) { _library.SetLyrics(_helper.Song.Title, _helper.Song.Artist, e.Lyrics); _lastLyrics = e.Lyrics; }