public Lyrics007(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit / 2; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = artist.Replace("#", ""); title = LyricUtil.TrimForParenthesis(title); title = title.Replace("#", ""); // Cannot find lyrics contaning non-English letters! string urlString = "http://www.lyrics007.com/" + artist + " Lyrics/" + title + " Lyrics.html"; timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); LyricsWebClient client = new LyricsWebClient(); client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(500, true)) { complete = true; } } }
protected override void FindLyricsWithTimer() { var artist = LyricUtil.RemoveFeatComment(Artist); artist = artist.Replace("#", ""); var title = LyricUtil.TrimForParenthesis(Title); title = title.Replace("#", ""); // Cannot find lyrics contaning non-English letters! var urlString = SiteBaseUrl + "/" + artist + " Lyrics/" + title + " Lyrics.html"; var uri = new Uri(urlString); var client = new LyricsWebClient(); client.OpenReadCompleted += CallbackMethod; client.OpenReadAsync(uri); while (Complete == false) { if (MEventStopSiteSearches.WaitOne(500, true)) { Complete = true; } } }
public LyricWiki(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit / 2; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.CapatalizeString(artist); artist = artist.Replace(" ", "_"); title = LyricUtil.TrimForParenthesis(title); title = LyricUtil.CapatalizeString(title); title = title.Replace(" ", "_"); title = title.Replace("?", "%3F"); if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } string urlString = "http://lyricwiki.org/" + artist + ":" + title; LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(300); } } }
public Actionext(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = artist.Replace(" ", "_"); title = LyricUtil.TrimForParenthesis(title); title = title.Replace(" ", "_"); if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } string urlString = "http://www.actionext.com/names_" + artist[0] + "/" + artist + "_lyrics/" + title + ".html"; urlString = urlString.ToLower(); LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(300); } } }
public EvilLabs(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new System.Timers.Timer(); if (LyricDiagnostics.TraceSource != null) { LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "EvilLabs(" + artist + ", " + title + ")"); } artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.TrimForParenthesis(artist); artist = artist.Replace(" ", "+"); title = LyricUtil.RemoveFeatComment(title); title = LyricUtil.TrimForParenthesis(title); title = title.Replace(" ", "+"); string urlString = "http://www.evillabs.sk/lyrics/" + artist + "+-+" + title; WebClient client = new WebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { System.Threading.Thread.Sleep(100); } } }
protected override void FindLyricsWithTimer() { // Clean artist name var artist = LyricUtil.RemoveFeatComment(Artist); artist = LyricUtil.CapatalizeString(artist); artist = artist.Replace(" ", "_"); // Clean title name var title = LyricUtil.TrimForParenthesis(Title); title = LyricUtil.CapatalizeString(title); title = title.Replace(" ", "_"); title = title.Replace("?", "%3F"); // Validate not empty if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } var urlString = SiteBaseUrl + "/" + artist + ":" + title; var client = new LyricsWebClient(); var uri = new Uri(urlString); client.OpenReadCompleted += CallbackMethod; client.OpenReadAsync(uri); while (Complete == false) { if (MEventStopSiteSearches.WaitOne(1, true)) { Complete = true; } else { Thread.Sleep(300); } } }
public LyrDB(string artist, string title, ManualResetEvent eventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new Timer(); m_EventStop_SiteSearches = eventStop_SiteSearches; artist = LyricUtil.RemoveFeatComment(artist); title = LyricUtil.TrimForParenthesis(title); //string urlString = string.Format("http://www.lyrdb.com/lookup.php?q={0}|{1}&for=match", artist, title); string urlString = string.Format("http://webservices.lyrdb.com/lookup.php?q={0}%7c{1}&for=match", artist, title); LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new OpenReadCompletedEventHandler(CallbackMethodSearch); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(300); } } }
public LyricsPluginSite(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); title = LyricUtil.TrimForParenthesis(title); // Escape characters artist = fixEscapeCharacters(artist); title = fixEscapeCharacters(title); // Hebrew letters artist = fixHebrew(artist); title = fixHebrew(title); // timer timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); // LyricsPlugin.com changed their API to need 2 calls. The first is to get a timer & code // 1st step string firstUrlString = "http://www.lyricsplugin.com/winamp03/plugin/?" + "artist=" + artist + "&title=" + title; Uri uri1 = new Uri(firstUrlString); LyricsWebClient client1 = new LyricsWebClient(); client1.OpenReadCompleted += new OpenReadCompletedEventHandler(firstCallbackMethod); client1.OpenReadAsync(uri1); while (firstStepComplete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { firstStepComplete = true; } else { Thread.Sleep(100); } } // assertion: !timestamp.Equals("") & !checkCode.Equals(""); // 2nd step string secondUrlString = "http://www.lyricsplugin.com/winamp03/plugin/content.php?" + "artist=" + artist + "&title=" + title + "&time=" + timestamp + "&check=" + checkCode; Uri uri2 = new Uri(secondUrlString); LyricsWebClient client2 = new LyricsWebClient(firstUrlString); client2.OpenReadCompleted += new OpenReadCompletedEventHandler(secondCallbackMethod); client2.OpenReadAsync(uri2); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(100); } } }
public LyricsOnDemand(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.DeleteSpecificChars(artist); artist = artist.Replace(" ", ""); artist = artist.Replace("The ", ""); artist = artist.Replace("the ", ""); artist = artist.Replace("-", ""); artist = artist.ToLower(); // Cannot find lyrics contaning non-English letters! title = LyricUtil.TrimForParenthesis(title); title = LyricUtil.DeleteSpecificChars(title); title = title.Replace(" ", ""); title = title.Replace("#", ""); artist = artist.Replace("-", ""); // Danish letters title = title.Replace("æ", ""); title = title.Replace("ø", ""); title = title.Replace("å", ""); title = title.Replace("Æ", ""); title = title.Replace("Ø", ""); title = title.Replace("Å", ""); title = title.Replace("ö", ""); title = title.Replace("Ö", ""); title = title.ToLower(); if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } string firstLetter = artist[0].ToString(); int firstNumber = 0; if (int.TryParse(firstLetter, out firstNumber)) { firstLetter = "0"; } string urlString = "http://www.lyricsondemand.com/" + firstLetter + "/" + artist + "lyrics/" + title + "lyrics.html"; LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(100); } } }
public SeekLyrics(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; timer = new System.Timers.Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = artist.Replace(" ", "-"); artist = artist.Replace("'", "-"); artist = artist.Replace("(", ""); artist = artist.Replace(")", ""); artist = artist.Replace(",", ""); artist = artist.Replace("#", ""); // German letters artist = artist.Replace("ü", "%FC"); artist = artist.Replace("Ü", ""); artist = artist.Replace("ä", "%E4"); artist = artist.Replace("Ä", ""); artist = artist.Replace("ö", "%E4"); // Not correct!!! artist = artist.Replace("Ö", ""); artist = artist.Replace("ß", "%DF"); // French letters artist = artist.Replace("é", "%E9"); title = LyricUtil.TrimForParenthesis(title); title = title.Replace(" ", "-"); title = title.Replace("'", "-"); title = title.Replace("(", ""); title = title.Replace(")", ""); title = title.Replace(",", ""); title = title.Replace("#", ""); title = title.Replace("?", ""); // German letters title = title.Replace("ü", "%FC"); title = title.Replace("Ü", "%FC"); title = title.Replace("ä", "%E4"); title = title.Replace("Ä", "%C4"); title = title.Replace("ö", "%F6"); title = title.Replace("Ö", "%D6"); title = title.Replace("ß", "%DF"); // French letters title = title.Replace("é", "%E9"); string urlString = "http://www.seeklyrics.com/lyrics/" + artist + "/" + title + ".html"; timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); LyricsWebClient client = new LyricsWebClient(); client.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { System.Threading.Thread.Sleep(100); } } }
protected override void FindLyricsWithTimer() { var artist = LyricUtil.RemoveFeatComment(Artist); artist = LyricUtil.DeleteSpecificChars(artist); artist = artist.Replace(" ", ""); artist = artist.Replace("The ", ""); artist = artist.Replace("the ", ""); artist = artist.Replace("-", ""); artist = artist.ToLower(); // Cannot find lyrics containing non-English letters! var title = LyricUtil.TrimForParenthesis(Title); title = LyricUtil.DeleteSpecificChars(title); title = title.Replace(" ", ""); title = title.Replace("#", ""); artist = artist.Replace("-", ""); // Danish letters title = title.Replace("æ", ""); title = title.Replace("ø", ""); title = title.Replace("å", ""); title = title.Replace("Æ", ""); title = title.Replace("Ø", ""); title = title.Replace("Å", ""); title = title.Replace("ö", ""); title = title.Replace("Ö", ""); title = title.ToLower(); // Validation if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } var firstLetter = artist[0].ToString(CultureInfo.InvariantCulture); int firstNumber; if (int.TryParse(firstLetter, out firstNumber)) { firstLetter = "0"; } var urlString = SiteBaseUrl + "/" + firstLetter + "/" + artist + "lyrics/" + title + "lyrics.html"; var client = new LyricsWebClient(); var uri = new Uri(urlString); client.OpenReadCompleted += CallbackMethod; client.OpenReadAsync(uri); while (Complete == false) { if (MEventStopSiteSearches.WaitOne(1, true)) { Complete = true; } else { Thread.Sleep(100); } } }
public HotLyrics(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit / 2; timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.CapatalizeString(artist); artist = artist.Replace(" ", "_"); artist = artist.Replace(",", "_"); artist = artist.Replace(".", "_"); artist = artist.Replace("'", "_"); artist = artist.Replace("(", "%28"); artist = artist.Replace(")", "%29"); artist = artist.Replace(",", ""); artist = artist.Replace("#", ""); artist = artist.Replace("%", ""); artist = artist.Replace("+", "%2B"); artist = artist.Replace("=", "%3D"); artist = artist.Replace("-", "_"); // French letters artist = artist.Replace("é", "%E9"); title = LyricUtil.TrimForParenthesis(title); title = LyricUtil.CapatalizeString(title); title = title.Replace(" ", "_"); title = title.Replace(",", "_"); title = title.Replace(".", "_"); title = title.Replace("'", "_"); title = title.Replace("(", "%28"); title = title.Replace(")", "%29"); title = title.Replace(",", "_"); title = title.Replace("#", "_"); title = title.Replace("%", "_"); title = title.Replace("?", "_"); title = title.Replace("+", "%2B"); title = title.Replace("=", "%3D"); title = title.Replace("-", "_"); title = title.Replace(":", "_"); // German letters artist = artist.Replace("ü", "%FC"); artist = artist.Replace("Ü", "%DC"); artist = artist.Replace("ä", "%E4"); artist = artist.Replace("Ä", "%C4"); artist = artist.Replace("ö", "%F6"); artist = artist.Replace("Ö", "%D6"); artist = artist.Replace("ß", "%DF"); // Danish letters title = title.Replace("å", "%E5"); title = title.Replace("Å", "%C5"); title = title.Replace("æ", "%E6"); title = title.Replace("ø", "%F8"); // French letters title = title.Replace("é", "%E9"); if (string.IsNullOrEmpty(artist) || string.IsNullOrEmpty(title)) { return; } string firstLetter = artist[0].ToString(); string urlString = "http://www.hotlyrics.net/lyrics/" + firstLetter + "/" + artist + "/" + title + ".html"; LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; timer.Elapsed += new ElapsedEventHandler(timer_Elapsed); timer.Start(); Uri uri = new Uri(urlString); client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) { if (m_EventStop_SiteSearches.WaitOne(1, true)) { complete = true; } else { Thread.Sleep(300); } } }