private void SearchCurrentLyricsSite() { if (_currentLyricsObject >= _lyricsObjects.Count) { SetStatus("Not Found"); LyricsNotFound?.Invoke(this, EventArgs.Empty); return; } string url = _lyricsObjects[_currentLyricsObject].GetSearchURL(_song); SetStatus("Checking " + _lyricsObjects[_currentLyricsObject].SiteName); LoadURL(url, "search"); }
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(); } }