From: <sa...@us...> - 2010-10-05 18:45:19
|
Revision: 3802 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3802&view=rev Author: saamand Date: 2010-10-05 18:45:12 +0000 (Tue, 05 Oct 2010) Log Message: ----------- Version 1.5.3.0 - Fix: LyricsPluginSite changed once again and an invalid result was returned when no lyric was found. Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-10-05 12:34:16 UTC (rev 3801) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-10-05 18:45:12 UTC (rev 3802) @@ -4,7 +4,7 @@ using System.Text; using System.Threading; using System.Timers; -using Timer=System.Timers.Timer; +using Timer = System.Timers.Timer; namespace LyricsEngine.LyricSites { @@ -63,7 +63,7 @@ } // 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; @@ -95,13 +95,13 @@ bool thisMayBeTheCorrectPage = true; StringBuilder lyricsCommand = new StringBuilder(); - LyricsWebClient client = (LyricsWebClient) sender; + LyricsWebClient client = (LyricsWebClient)sender; Stream reply = null; StreamReader sr = null; try { - reply = (Stream) e.Result; + reply = (Stream)e.Result; sr = new StreamReader(reply, Encoding.UTF8); string line = ""; @@ -125,7 +125,7 @@ lyricsCommand.Append(line); string[] parameters = line.Split('\''); - + // todo - Find a better check here if (parameters.Length == 9) { @@ -207,7 +207,7 @@ // Clean lyrics lyric = cleanLyrics(lyricTemp); - if (lyric.Length == 0) + if (lyric.Length == 0 || (lyric.Contains("<") || lyric.Contains(">") || lyric.Contains("a href") || lyric.ToLower().Contains("www"))) { lyric = "Not found"; } @@ -238,6 +238,8 @@ lyricTemp.Replace("<br />", Environment.NewLine); lyricTemp.Replace(""", "\""); + lyricTemp.Replace(@"<a href=""http://www.tunerankings.com/"" target=""_blank"">www.tunerankings.com</a>", string.Empty); + return lyricTemp.ToString().Trim(); } Modified: trunk/plugins/MyLyrics/My Lyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-10-05 12:34:16 UTC (rev 3801) +++ trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-10-05 18:45:12 UTC (rev 3802) @@ -1,4 +1,4 @@ -Release notes to MyLyrics 1.5.2.0 +Release notes to MyLyrics 1.5.3.0 MyLyrics displays the lyric of the currently played song inside MediaPortal. The plugin can show LRC's and plain lyrics. It uses both musictags and online searches to find lyrics. @@ -33,6 +33,9 @@ Compatible with MediaPortal 1.1.0 nad 1.1.1 +Changes and fixes since version 1.5.2.0 +- Fix: LyricsPluginSite changed once again and an invalid result was returned when no lyric was found. + Changes and fixes since version 1.5.1.0 - Fix: LyricsPluginSite fixed and reenabled (big thanks to yoavain). - Fix: Lyrics007 which didn't return valid result. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |