From: <sa...@us...> - 2008-12-11 17:13:09
|
Revision: 2416 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2416&view=rev Author: saamand Date: 2008-12-11 17:13:03 +0000 (Thu, 11 Dec 2008) Log Message: ----------- 1.10RC1 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/LyricsEngine/Web References/org.lyricwiki/Reference.cs trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.resx trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup_test.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/Properties/Resources.Designer.cs trunk/plugins/MyLyrics/My Lyrics/TagReaderUtil.cs trunk/plugins/MyLyrics/MyLyrics.sln Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -77,5 +77,15 @@ return str; } + + public static string CleanLyrics(string lyrics) + { + while (lyrics.Contains(@"''")) + { + lyrics = lyrics.Replace(@"''", "'"); + } + + return lyrics; + } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -185,11 +185,13 @@ internal void LyricFound(String lyricStrings, String artist, String title, String site) { + string cleanLyric = LyricUtil.CleanLyrics(lyricStrings); + --m_noOfCurrentSearches; if (m_allowAllToComplete || m_StopSearches == false) { - m_Form.LyricFound = new Object[] { lyricStrings, artist, title, site }; + m_Form.LyricFound = new Object[] { cleanLyric, artist, title, site }; StatusUpdate(artist, title, site, true); } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Text; using System.Runtime.Serialization; +using System.Text.RegularExpressions; namespace MyLyrics { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2008-12-11 17:13:03 UTC (rev 2416) @@ -1,8 +1,8 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.50727</ProductVersion> + <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B0760CE8-086F-4301-9091-C9BE54F261FD}</ProjectGuid> <OutputType>Library</OutputType> @@ -11,6 +11,11 @@ <AssemblyName>LyricsEngine</AssemblyName> <StartupObject> </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>2.0</OldToolsVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -48,11 +53,14 @@ <Compile Include="LyricsDatabase\LyricsItem.cs" /> <Compile Include="LyricSearch.cs" /> <Compile Include="LyricDiagnostics.cs" /> + <Compile Include="LyricsSites\Actionext.cs" /> <Compile Include="LyricsSites\HotLyrics.cs" /> - <Compile Include="LyricsSites\EvilLabs.cs" /> <Compile Include="LyricsSites\Lyrics007.cs" /> <Compile Include="LyricsSites\LyricsOnDemand.cs" /> <Compile Include="LyricsSites\SeekLyrics.cs" /> + <Compile Include="LyricsWebClient.cs"> + <SubType>Component</SubType> + </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="ICommand.cs" /> <Compile Include="ILyricForm.cs" /> Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -100,7 +100,7 @@ string urlString = "http://www.hotlyrics.net/lyrics/" + firstLetter + "/" + artist + "/" + title + ".html"; - WebClient client = new WebClient(); + LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; @@ -129,7 +129,7 @@ bool thisMayBeTheCorrectLyric = true; StringBuilder lyricTemp = new StringBuilder(); - WebClient client = (WebClient)sender; + LyricsWebClient client = (LyricsWebClient)sender; Stream reply = null; StreamReader sr = null; @@ -186,7 +186,6 @@ lyric = lyricTemp.ToString().Trim(); - // if warning message from Evil Labs' sql-server, then lyric isn't found if (lyric.Contains("<td")) { lyric = "Not found"; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -6,6 +6,7 @@ using System.Net; using System.Threading; using System.Timers; +using System.Text.RegularExpressions; namespace LyricsEngine.LyricSites { @@ -39,14 +40,13 @@ string urlString = "http://www.lyrics007.com/" + artist + " Lyrics/" + title + " Lyrics.html"; - WebClient client = new WebClient(); - 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); @@ -66,10 +66,7 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { - bool thisMayBeTheCorrectLyric = true; - StringBuilder lyricTemp = new StringBuilder(); - - WebClient client = (WebClient)sender; + LyricsWebClient client = (LyricsWebClient)sender; Stream reply = null; StreamReader sr = null; @@ -78,66 +75,49 @@ reply = (Stream)e.Result; sr = new StreamReader(reply); - string line = ""; - int noOfLinesCount = 0; + string line = sr.ReadToEnd(); - while (line.IndexOf("<td>Song: <strong>") == -1 && line.IndexOf("polyphonic ringtone to your cell phone") == -1) + // Replace the new line stuff in the result, as the regex might have problems + line = line.Replace("\n", ""); + line = line.Replace("\r", ""); + line = line.Replace("\t", ""); + + //string pat = @"<script\s*type=""text/javascript""\s*src=""http://www2\.ringtonematcher\.com/jsstatic/lyrics007\.js""></script>.*?</div>(.*?)<div.*"; + //string pat = @"src=""/images/phone2.gif""><br><br><br></div>(.*?)<div align=center>"; + string pat = @"<br><br><br></div>(.*?)<div.*"; + + // Compile the regular expression. + Regex r = new Regex(pat, RegexOptions.IgnoreCase); + // Match the regular expression pattern against a text string. + Match m = r.Match(line); + if (m.Success) { - if (sr.EndOfStream || ++noOfLinesCount > 300) + Group g1 = m.Groups[1]; + foreach (Capture c1 in g1.Captures) { - thisMayBeTheCorrectLyric = false; - break; + lyric = c1.Value; } - else - { - line = sr.ReadLine(); - } } - if (thisMayBeTheCorrectLyric) + if (lyric.Length > 0) { - lyricTemp = new StringBuilder(); - string textToCutFrom = @"<tr><td width=10></td><td>"; - int indexToCutFrom = line.LastIndexOf(textToCutFrom) + textToCutFrom.Length; - lyricTemp.Append(line.Substring(indexToCutFrom)); - line = sr.ReadLine(); - - while (line.IndexOf("The hottest songs") == -1 && line.IndexOf("Maybe you are looking for:") == -1) - { - lyricTemp.Append(line); - if (sr.EndOfStream || ++noOfLinesCount > 300) - { - thisMayBeTheCorrectLyric = false; - break; - } - else - { - line = sr.ReadLine(); - } - } - - lyricTemp.Replace("??s", "'s"); - lyricTemp.Replace("??t", "'t"); - lyricTemp.Replace("??m", "'m"); - lyricTemp.Replace("??l", "'l"); - lyricTemp.Replace("??v", "'v"); - lyricTemp.Replace("?s", "'s"); - lyricTemp.Replace("?t", "'t"); - lyricTemp.Replace("?m", "'m"); - lyricTemp.Replace("?l", "'l"); - lyricTemp.Replace("?v", "'v"); - lyricTemp.Replace("<br>", "\r\n"); - lyricTemp.Replace("<br />", "\r\n"); - lyricTemp.Replace("<BR>", "\r\n"); - - lyric = lyricTemp.ToString().Trim(); - - // if warning message from Evil Labs' sql-server, then lyric isn't found - if (lyric.Contains("<td")) - { - lyric = "Not found"; - } + lyric = lyric.Replace("??s", "'s"); + lyric = lyric.Replace("??t", "'t"); + lyric = lyric.Replace("??m", "'m"); + lyric = lyric.Replace("??l", "'l"); + lyric = lyric.Replace("??v", "'v"); + lyric = lyric.Replace("?s", "'s"); + lyric = lyric.Replace("?t", "'t"); + lyric = lyric.Replace("?m", "'m"); + lyric = lyric.Replace("?l", "'l"); + lyric = lyric.Replace("?v", "'v"); + lyric = lyric.Replace("<br>", "\r\n"); + lyric = lyric.Replace("<br />", "\r\n"); + lyric = lyric.Replace("<BR>", "\r\n"); + lyric = lyric.Trim(); } + else + lyric = "Not found"; } catch (Exception) { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -69,7 +69,7 @@ string urlString = "http://www.lyricsondemand.com/" + firstLetter + "/" + artist + "lyrics/" + title + "lyrics.html"; - WebClient client = new WebClient(); + LyricsWebClient client = new LyricsWebClient(); timer.Enabled = true; timer.Interval = timeLimit; @@ -98,7 +98,7 @@ bool thisMayBeTheCorrectLyric = true; StringBuilder lyricTemp = new StringBuilder(); - WebClient client = (WebClient)sender; + LyricsWebClient client = (LyricsWebClient)sender; Stream reply = null; StreamReader sr = null; @@ -159,7 +159,6 @@ lyric = lyricTemp.ToString().Trim(); - // if warning message from Evil Labs' sql-server, then lyric isn't found if (lyric.Contains("<td") || lyric.Contains("<IFRAME")) { lyric = "Not found"; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -6,6 +6,7 @@ using System.Net; using System.Threading; using System.Timers; +using System.Text.RegularExpressions; namespace LyricsEngine.LyricSites { @@ -61,11 +62,11 @@ // German letters title = title.Replace("\xFC", "%FC"); - title = title.Replace("\xDC", ""); + title = title.Replace("\xDC", "%FC"); title = title.Replace("\xE4", "%E4"); - title = title.Replace("\xC4", ""); - title = title.Replace("\xF6", "%E4"); // Not correct!!! - title = title.Replace("\xD6", ""); + title = title.Replace("\xC4", "%C4"); + title = title.Replace("\xF6", "%F6"); + title = title.Replace("\xD6", "%D6"); title = title.Replace("\xDF", "%DF"); // French letters @@ -74,14 +75,13 @@ string urlString = "http://www.seeklyrics.com/lyrics/" + artist + "/" + title + ".html"; - WebClient client = new WebClient(); - 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); @@ -100,10 +100,7 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { - bool thisMayBeTheCorrectLyric = true; - StringBuilder lyricTemp = new StringBuilder(); - - WebClient client = (WebClient)sender; + LyricsWebClient client = (LyricsWebClient)sender; Stream reply = null; StreamReader sr = null; @@ -112,71 +109,45 @@ reply = (Stream)e.Result; sr = new StreamReader(reply); - string line = ""; - int noOfLinesCount = 0; + string line = sr.ReadToEnd(); - while (line.IndexOf("<pre>") == -1) - { - if (sr.EndOfStream || ++noOfLinesCount > 300) - { - thisMayBeTheCorrectLyric = false; - break; - } - else - { - line = sr.ReadLine(); - } - } + // Replace the new line stuff in the result, as the regex might have problems + line = line.Replace("\n", ""); + line = line.Replace("\r", ""); + line = line.Replace("\t", ""); - if (thisMayBeTheCorrectLyric) - { - lyricTemp = new StringBuilder(); - string textToCutFrom = "<pre>"; - int indexToCutFrom = line.LastIndexOf(textToCutFrom) + textToCutFrom.Length; - lyricTemp.Append(line.Substring(indexToCutFrom)); - if (line.Substring(indexToCutFrom).Contains("<F")) - lyricTemp = new StringBuilder(); + string pat = @"<a href=""http://www\.ringtonematcher\.com/.*?</a>(.*?)<a href"; - line = sr.ReadLine(); - - while (line.IndexOf("</pre>") == -1) - { - lyricTemp.Append(line); - if (sr.EndOfStream || ++noOfLinesCount > 300) - { - thisMayBeTheCorrectLyric = false; - break; - } - else - { - line = sr.ReadLine(); - } - } - - textToCutFrom = "</pre>"; - indexToCutFrom = line.LastIndexOf(textToCutFrom); - lyricTemp.Append(line.Substring(0, indexToCutFrom)); - - lyricTemp.Replace("?s", "'s"); - lyricTemp.Replace("?t", "'t"); - lyricTemp.Replace("?m", "'m"); - lyricTemp.Replace("?l", "'l"); - lyricTemp.Replace("?v", "'v"); - lyricTemp.Replace("<br>", "\r\n"); - lyricTemp.Replace("<br />", "\r\n"); - lyricTemp.Replace("'", "'"); - lyricTemp.Replace("</p>", ""); - lyricTemp.Replace("<BR>", ""); - lyricTemp.Replace("<br/>", "\r\n"); - - lyric = lyricTemp.ToString().Trim(); - - // if warning message from Evil Labs' sql-server, then lyric isn't found - if (lyric.Contains("<td")) - { - lyric = "Not found"; - } + // Compile the regular expression. + Regex r = new Regex(pat, RegexOptions.IgnoreCase); + // Match the regular expression pattern against a text string. + Match m = r.Match(line); + if (m.Success) + { + Group g1 = m.Groups[1]; + foreach (Capture c1 in g1.Captures) + { + lyric = c1.Value; } + } + + if (lyric.Length > 0) + { + lyric = lyric.Replace("?s", "'s"); + lyric = lyric.Replace("?t", "'t"); + lyric = lyric.Replace("?m", "'m"); + lyric = lyric.Replace("?l", "'l"); + lyric = lyric.Replace("?v", "'v"); + lyric = lyric.Replace("<br>", "\r\n"); + lyric = lyric.Replace("<br />", "\r\n"); + lyric = lyric.Replace("'", "'"); + lyric = lyric.Replace("</p>", ""); + lyric = lyric.Replace("<BR>", ""); + lyric = lyric.Replace("<br/>", "\r\n"); + lyric = lyric.Trim(); + } + else + lyric = "Not found"; } catch (System.Reflection.TargetInvocationException) { Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.23")] +[assembly: AssemblyVersion("1.1")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.1434 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.1434 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -12,7 +12,7 @@ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -12,7 +12,7 @@ "Lyrics007", "LyricsOnDemand", "HotLyrics", - "EvilLabs", + "Actionext", "SeekLyrics" }; Modified: trunk/plugins/MyLyrics/LyricsEngine/Web References/org.lyricwiki/Reference.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Web References/org.lyricwiki/Reference.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/LyricsEngine/Web References/org.lyricwiki/Reference.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.1434 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -9,7 +9,7 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42. +// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.1434. // #pragma warning disable 1591 @@ -23,7 +23,7 @@ /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="LyricWikiBinding", Namespace="urn:LyricWiki")] @@ -557,7 +557,7 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1434")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] @@ -590,7 +590,7 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1434")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] @@ -635,7 +635,7 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.1434")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] @@ -704,11 +704,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void checkSongExistsCompletedEventHandler(object sender, checkSongExistsCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class checkSongExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -730,11 +730,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void searchArtistsCompletedEventHandler(object sender, searchArtistsCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class searchArtistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -756,11 +756,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void searchAlbumsCompletedEventHandler(object sender, searchAlbumsCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class searchAlbumsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -782,11 +782,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void searchSongsCompletedEventHandler(object sender, searchSongsCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class searchSongsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -808,11 +808,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void getSOTDCompletedEventHandler(object sender, getSOTDCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class getSOTDCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -834,11 +834,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void getSongCompletedEventHandler(object sender, getSongCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class getSongCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -860,11 +860,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void getSongResultCompletedEventHandler(object sender, getSongResultCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class getSongResultCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -886,11 +886,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void getArtistCompletedEventHandler(object sender, getArtistCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class getArtistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -920,11 +920,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void getAlbumCompletedEventHandler(object sender, getAlbumCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class getAlbumCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -978,11 +978,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void postArtistCompletedEventHandler(object sender, postArtistCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class postArtistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1020,11 +1020,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void postAlbumCompletedEventHandler(object sender, postAlbumCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class postAlbumCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1078,11 +1078,11 @@ } /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] public delegate void postSongCompletedEventHandler(object sender, postSongCompletedEventArgs e); /// <remarks/> - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1434")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class postSongCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { Modified: trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -61,8 +61,11 @@ return artist + "-" + title; } + public static void WriteToLyricsDatabase(LyricsDatabase lyricsDB, LyricsDatabase lyricsMarkedDB, string capArtist, string capTitle, string lyric, string site) { + lyric = LyricUtil.CleanLyrics(lyric); + if (DatabaseUtil.IsTrackInLyricsDatabase(lyricsDB, capArtist, capTitle).Equals(DatabaseUtil.LYRIC_NOT_FOUND)) { lyricsDB.Add(DatabaseUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, lyric, site)); @@ -76,6 +79,8 @@ public static void ReplaceInLyricsDatabase(LyricsDatabase currentLyricsDB, string capArtist, string capTitle, string lyric, string site) { + lyric = LyricUtil.CleanLyrics(lyric); + LyricsDatabase otherDatabase = GetOtherLyricsDatabase(currentLyricsDB); string key = DatabaseUtil.CorrectKeyFormat(capArtist, capTitle); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -36,11 +36,11 @@ this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.panel1 = new System.Windows.Forms.Panel(); + this.label8 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); this.linkLabelForum = new System.Windows.Forms.LinkLabel(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -61,7 +61,7 @@ // this.lbInfo2.AutoSize = true; this.lbInfo2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbInfo2.ForeColor = System.Drawing.Color.Navy; + this.lbInfo2.ForeColor = System.Drawing.Color.Black; this.lbInfo2.Location = new System.Drawing.Point(26, 153); this.lbInfo2.Name = "lbInfo2"; this.lbInfo2.Size = new System.Drawing.Size(326, 17); @@ -72,12 +72,12 @@ // this.lbInfo1.AutoSize = true; this.lbInfo1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbInfo1.ForeColor = System.Drawing.Color.Navy; + this.lbInfo1.ForeColor = System.Drawing.Color.Black; this.lbInfo1.Location = new System.Drawing.Point(26, 30); this.lbInfo1.Name = "lbInfo1"; - this.lbInfo1.Size = new System.Drawing.Size(225, 17); + this.lbInfo1.Size = new System.Drawing.Size(246, 17); this.lbInfo1.TabIndex = 3; - this.lbInfo1.Text = "MyLyrics plugin, version 1.00"; + this.lbInfo1.Text = "MyLyrics plugin, version 1.1 RC1"; // // label2 // @@ -93,7 +93,7 @@ // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.ForeColor = System.Drawing.Color.Navy; + this.label4.ForeColor = System.Drawing.Color.Black; this.label4.Location = new System.Drawing.Point(3, 4); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(100, 13); @@ -127,58 +127,58 @@ this.panel1.Size = new System.Drawing.Size(480, 251); this.panel1.TabIndex = 8; // - // label3 + // label8 // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(12, 79); - this.label3.MaximumSize = new System.Drawing.Size(460, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(447, 39); - this.label3.TabIndex = 7; - this.label3.Text = resources.GetString("label3.Text"); + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(12, 189); + this.label8.MaximumSize = new System.Drawing.Size(460, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(454, 52); + this.label8.TabIndex = 11; + this.label8.Text = resources.GetString("label8.Text"); // - // label1 + // label7 // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.ForeColor = System.Drawing.Color.Navy; - this.label1.Location = new System.Drawing.Point(3, 66); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(144, 13); - this.label1.TabIndex = 8; - this.label1.Text = "Music database browse:"; + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label7.ForeColor = System.Drawing.Color.Black; + this.label7.Location = new System.Drawing.Point(3, 176); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(53, 13); + this.label7.TabIndex = 10; + this.label7.Text = "Settings"; // // label6 // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label6.ForeColor = System.Drawing.Color.Navy; + this.label6.ForeColor = System.Drawing.Color.Black; this.label6.Location = new System.Drawing.Point(3, 127); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(136, 13); this.label6.TabIndex = 9; this.label6.Text = "Music database batch:"; // - // label7 + // label1 // - this.label7.AutoSize = true; - this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label7.ForeColor = System.Drawing.Color.Navy; - this.label7.Location = new System.Drawing.Point(3, 176); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(53, 13); - this.label7.TabIndex = 10; - this.label7.Text = "Settings"; + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.ForeColor = System.Drawing.Color.Black; + this.label1.Location = new System.Drawing.Point(3, 66); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(144, 13); + this.label1.TabIndex = 8; + this.label1.Text = "Music database browse:"; // - // label8 + // label3 // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(12, 189); - this.label8.MaximumSize = new System.Drawing.Size(460, 0); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(454, 52); - this.label8.TabIndex = 11; - this.label8.Text = resources.GetString("label8.Text"); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(12, 79); + this.label3.MaximumSize = new System.Drawing.Size(460, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(447, 39); + this.label3.TabIndex = 7; + this.label3.Text = resources.GetString("label3.Text"); // // linkLabelForum // Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.resx 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.resx 2008-12-11 17:13:03 UTC (rev 2416) @@ -125,10 +125,10 @@ <data name="label2.Text" xml:space="preserve"> <value>Here you can see your lyrics (containing the songs with a matching lyric) and your marked database (containing the songs that have been searched without any matching lyrics found). You can modify, import, and find an alternative title for a known song amont other things.</value> </data> + <data name="label8.Text" xml:space="preserve"> + <value>Here you can set up the plugin as you prefer. E.g. you can choose the name to be shown for the plugin inside MediaPortal or if a found lyric should be stored in the tag of the music file. You can also tweak the settings regarding the "Find Lyric" dialog accessable from the "Lyrics database" tab, and choose which sites you want to query in your searches.</value> + </data> <data name="label3.Text" xml:space="preserve"> <value>This is where you can browsw your music database and manually select the songs taht you would like to search the Internet for. When a lyric is found it is added to the lyrics database. If not it is added to the marked database.</value> </data> - <data name="label8.Text" xml:space="preserve"> - <value>Here you can set up the plugin as you prefer. E.g. you can choose the name to be shown for the plugin inside MediaPortal or if a found lyric should be stored in the tag of the music file. You can also tweak the settings regarding the "Find Lyric" dialog accessable from the "Lyrics database" tab, and choose which sites you want to query in your searches.</value> - </data> </root> \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -42,16 +42,15 @@ this.groupBox2 = new System.Windows.Forms.GroupBox(); this.tbLyrics = new System.Windows.Forms.TextBox(); this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbActionext = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btCancel = new System.Windows.Forms.Button(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btClose = new System.Windows.Forms.Button(); this.btUpdate = new System.Windows.Forms.Button(); - this.cbActionext = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.gbSearchInfo.SuspendLayout(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -137,8 +136,8 @@ this.lvSearchResults.TabIndex = 10; this.lvSearchResults.UseCompatibleStateImageBehavior = false; this.lvSearchResults.View = System.Windows.Forms.View.Details; - this.lvSearchResults.DoubleClick += new System.EventHandler(this.lvSearchResults_DoubleClick); this.lvSearchResults.SelectedIndexChanged += new System.EventHandler(this.lvSearchResults_SelectedIndexChanged); + this.lvSearchResults.DoubleClick += new System.EventHandler(this.lvSearchResults_DoubleClick); // // cbSite // @@ -183,7 +182,6 @@ this.gbLyricSites.Controls.Add(this.cbSeekLyrics); this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); - this.gbLyricSites.Controls.Add(this.cbEvilLabs); this.gbLyricSites.Controls.Add(this.cbLyricWiki); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(12, 103); @@ -193,6 +191,19 @@ this.gbLyricSites.TabStop = false; this.gbLyricSites.Text = "Lyric sites to search"; // + // cbActionext + // + this.cbActionext.AutoSize = true; + this.cbActionext.Checked = true; + this.cbActionext.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbActionext.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbActionext.Location = new System.Drawing.Point(131, 43); + this.cbActionext.Name = "cbActionext"; + this.cbActionext.Size = new System.Drawing.Size(68, 17); + this.cbActionext.TabIndex = 17; + this.cbActionext.Text = "Actionext"; + this.cbActionext.UseVisualStyleBackColor = true; + // // btCancel // this.btCancel.Location = new System.Drawing.Point(352, 67); @@ -255,19 +266,6 @@ this.cbLyrics007.Text = "Lyrics 007"; this.cbLyrics007.UseVisualStyleBackColor = true; // - // cbEvilLabs - // - this.cbEvilLabs.AutoSize = true; - this.cbEvilLabs.Checked = true; - this.cbEvilLabs.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbEvilLabs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbEvilLabs.Location = new System.Drawing.Point(222, 21); - this.cbEvilLabs.Name = "cbEvilLabs"; - this.cbEvilLabs.Size = new System.Drawing.Size(67, 17); - this.cbEvilLabs.TabIndex = 16; - this.cbEvilLabs.Text = "Evil Labs"; - this.cbEvilLabs.UseVisualStyleBackColor = true; - // // cbLyricWiki // this.cbLyricWiki.AutoSize = true; @@ -302,24 +300,11 @@ this.btUpdate.UseVisualStyleBackColor = true; this.btUpdate.Click += new System.EventHandler(this.btUpdate_Click); // - // cbActionext - // - this.cbActionext.AutoSize = true; - this.cbActionext.Checked = true; - this.cbActionext.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbActionext.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbActionext.Location = new System.Drawing.Point(131, 43); - this.cbActionext.Name = "cbActionext"; - this.cbActionext.Size = new System.Drawing.Size(68, 17); - this.cbActionext.TabIndex = 17; - this.cbActionext.Text = "Actionext"; - this.cbActionext.UseVisualStyleBackColor = true; - // // FindLyric // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(456, 584); + this.ClientSize = new System.Drawing.Size(448, 575); this.ControlBox = false; this.Controls.Add(this.btUpdate); this.Controls.Add(this.btClose); @@ -361,7 +346,6 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbSeekLyrics; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbEvilLabs; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; private System.Windows.Forms.ListView lvSearchResults; private System.Windows.Forms.ColumnHeader cbSite; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -80,7 +80,6 @@ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { cbLyricWiki.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") ? true : false; - cbEvilLabs.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useEvilLabs", "True")).ToString().Equals("True") ? true : false; cbActionext.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useActionext", "True")).ToString().Equals("True") ? true : false; cbLyrics007.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).ToString().Equals("True") ? true : false; cbLyricsOnDemand.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals("True") ? true : false; @@ -150,10 +149,6 @@ { sitesToSearch.Add("LyricWiki"); } - if (cbEvilLabs.Checked) - { - sitesToSearch.Add("EvilLabs"); - } if (cbActionext.Checked) { sitesToSearch.Add("Actionext"); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.Designer.cs 2008-12-11 17:00:53 UTC (rev 2415) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.Designer.cs 2008-12-11 17:13:03 UTC (rev 2416) @@ -33,7 +33,6 @@ this.lbDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLRCTest = new System.Windows.Forms.Label(); this.lbSongs2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbLyrics = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbSongs = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbArtists2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbTitle = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -44,6 +43,7 @@ this.btResetLyricsDatabase = new System.Windows.Forms.Button(); this.lbResetDatabase = new MediaPortal.UserInterface.Controls.MPLabel(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); + this.tbLyrics = new System.Windows.Forms.TextBox(); this.gbLibrary.SuspendLayout(); this.gbExport.SuspendLayout(); this.gbImport.SuspendLayout(); @@ -94,6 +94,7 @@ // // gbLibrary // + this.gbLibrary.Controls.Add(this.tbLyrics); this.gbLibrary.Controls.Add(this.gbExport); this.gbLibrary.Controls.Add(this.gbImport); this.gbLibrary.Controls.Add(this.gbEditLyrics); @@ -102,7 +103,6 @@ this.gbLibrary.Controls.Add(this.lbDatabase); this.gbLibrary.Controls.Add(this.lbLRCTest); this.gbLibrary.Controls.Add(this.lbSongs2); - this.gbLibrary.Controls.Add(this.tbLyrics); this.gbLibrary.Controls.Add(this.lbSongs); this.gbLibrary.Controls.Add(this.lbArtists2); this.gbLibrary.Controls.Add(this.lbTitle); @@ -269,19 +269,6 @@ this.lbSongs2.TabIndex = 23; this.lbSongs2.Text = "-"; // - // tbLyrics - // - this.tbLyrics.AllowDrop = true; - this.tbLyrics.BorderColor = System.Drawing.Color.Empty; - this.tbLyrics.Enabled = false; - this.tbLyrics.Location = new System.Drawing.Point(235, 78); - this.tbLyrics.Multiline = true; - this.tbLyrics.Name = "tbLyrics"; - this.tbLyrics.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.tbLyrics.Size = new System.Drawing.Size(298, 213); - this.tbLyrics.TabIndex = 6; - this.tbLyrics.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbLyrics_KeyUp); - // // lbSongs // this.lbSongs.Location = new System.Drawing.Point(11, 62); @@ -373,6 +360,15 @@ "erns [Artist]-[Title].txt and *.lrc will be included to the lyrics database."; this.folderBrowserDialog1.ShowNewFolderButton = false; // + // tbLyrics + // + this.tbLyrics.Location = new System.Drawing.Point(241, 78); + this.tbLyrics.Multiline = true; + thi... [truncated message content] |