From: <sa...@us...> - 2009-11-27 17:38:35
|
Revision: 3188 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3188&view=rev Author: saamand Date: 2009-11-27 17:38:18 +0000 (Fri, 27 Nov 2009) Log Message: ----------- Implemented translation Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/MyLyrics.sln Added Paths: ----------- trunk/plugins/MyLyrics/TranslateProvider/ trunk/plugins/MyLyrics/TranslateProvider/App_bin/ trunk/plugins/MyLyrics/TranslateProvider/App_bin/Documentation.chm trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.XML trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.dll trunk/plugins/MyLyrics/TranslateProvider/Properties/ trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.cs trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.csproj trunk/plugins/MyLyrics/TranslateProvider/bin/ trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/ trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/GoogleTranslateAPI.dll trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/GoogleTranslateAPI.xml trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.pdb trunk/plugins/MyLyrics/TranslateProvider/obj/ trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/ trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/Refactor/ trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/Refactor/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TempPE/ trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.csproj.FileListAbsolute.txt trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.pdb Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2009-11-25 19:10:25 UTC (rev 3187) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2009-11-27 17:38:18 UTC (rev 3188) @@ -16,6 +16,7 @@ <UpgradeBackupLocation> </UpgradeBackupLocation> <OldToolsVersion>2.0</OldToolsVersion> + <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -34,6 +35,22 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> @@ -129,7 +146,7 @@ </Target> --> <PropertyGroup> - <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal"</PostBuildEvent> + <PostBuildEvent>copy $(TargetPath) "C:\Program Files (x86)\Team MediaPortal\MediaPortal"</PostBuildEvent> <PreBuildEvent> </PreBuildEvent> </PropertyGroup> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2009-11-25 19:10:25 UTC (rev 3187) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2009-11-27 17:38:18 UTC (rev 3188) @@ -192,6 +192,15 @@ [SkinControlAttribute((int)GUI_LRC_Controls.CONTROL_ART_PROGRESS)] protected GUIProgressControl GUIelement_ProgTrack = null; + [SkinControlAttribute(950)] + protected GUIButtonControl buttonStandardButton1 = null; + [SkinControlAttribute(951)] + protected GUIButtonControl buttonStandardButton2 = null; + [SkinControlAttribute(952)] + protected GUIButtonControl buttonStandardButton3 = null; + [SkinControlAttribute(953)] + protected GUIButtonControl buttonStandardButton4 = null; + #endregion int m_SearchType = 0; @@ -670,6 +679,23 @@ public override void OnAction(Action action) { + + if (action.wID == Action.ActionType.ACTION_MOUSE_MOVE) + { + return; + } + + //if (action.wID == Action.ActionType.ACTION_MOVE_LEFT) + //{ + // GUIControl.HideControl(GetID, CONTROL_LYRIC_SELECTED); + // GUIControl.HideControl(GetID, CONTROL_LYRICWIDE_SELECTED); + //} + //else if (action.wID == Action.ActionType.ACTION_MOVE_RIGHT) + //{ + // GUIControl.ShowControl(GetID, CONTROL_LYRIC_SELECTED); + // GUIControl.ShowControl(GetID, CONTROL_LYRICWIDE_SELECTED); + //} + switch (action.wID) { case Action.ActionType.ACTION_PREVIOUS_MENU: @@ -697,7 +723,6 @@ if (m_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); - } else { @@ -886,6 +911,105 @@ base.OnAction(action); } + + protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == buttonStandardButton1) + { + m_SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + + m_selectedScreen = (int)MyLyricsSettings.Screen.LRC_BASIC; + resetGUI(m_selectedScreen); + + m_newTrack = true; + + } + if (control == buttonStandardButton2) + { + m_SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; + + m_selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_BASIC; + resetGUI(m_selectedScreen); + + m_newTrack = true; + } + if (control == buttonStandardButton3) + { + // Don't use a stream to create a LRC + if (g_Player.IsRadio) + { + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + dlg.SetHeading("LRC editor error"); + dlg.SetLine(1, "You cannot tag a streaming"); + dlg.SetLine(2, "media due to inproper timestamps."); + dlg.SetLine(3, String.Empty); + dlg.DoModal(GUIWindowManager.ActiveWindow); + return; + } + + //m_lyricsFound = false; + if (m_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) + { + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + } + + //m_newTrack = true; + + ShowLRCtoEdit(); + + Process(); + } + + if (control == buttonStandardButton4) + { + TranslateProvider.TranslateProvider translate = null; + + m_StatusText = string.Empty; + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); + + try + { + translate = new TranslateProvider.TranslateProvider("www.team-mediaportal.com/MyLyrics"); + } + catch (FileNotFoundException ex) + { + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + dlg.SetHeading("File not found"); + dlg.SetLine(1, "The TranslateProvider.dll assembly"); + dlg.SetLine(2, "could not be found."); + dlg.SetLine(3, String.Empty); + dlg.DoModal(GUIWindowManager.ActiveWindow); + } + + string translateTo = "da"; + string detectedLanguage; + bool reliable; + double confidence; + + string translation = translate.Translate(m_LyricText, translateTo, out detectedLanguage, out reliable, out confidence, "\n"); + + translation = MediaPortalUtil.MakePlainLyricPerfectToShow(translation); + + if (m_basicScreenSelected.HasValue == false || m_basicScreenSelected.Value) + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); + GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, translation); + GUIControl.FocusControl(GetID, CONTROL_LYRIC_SELECTED); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS_WIDE); + GUIControl.SetControlLabel(GetID, CONTROL_LYRICWIDE_SELECTED, translation); + GUIControl.FocusControl(GetID, CONTROL_LYRICWIDE_SELECTED); + } + + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics translation to " + detectedLanguage); + } + + base.OnClicked(controlId, control, actionType); + } + + //event driven handler to detect track change private void trackChangeHandler(string tag2, string value) { @@ -927,7 +1051,7 @@ m_StatusText = "Stream info not complete"; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); } - else if(!g_Player.CurrentFile.Equals(m_LastStreamFile) + else if (!g_Player.CurrentFile.Equals(m_LastStreamFile) || !newArtist.Equals(m_artist) || !newTitle.Equals(m_title)) { resetGUI(m_selectedScreen); @@ -1017,7 +1141,7 @@ #region 1) LRC in music tag if (m_AutomaticReadFromMusicTag && g_Player.IsRadio == false - && m_CurrentTrackTag != null &&((m_CurrentTrackTag.Lyrics.Length != 0 + && m_CurrentTrackTag != null && ((m_CurrentTrackTag.Lyrics.Length != 0 && (m_SimpleLrc = new SimpleLRC(m_artist, m_title, m_CurrentTrackTag.Lyrics)).IsValid))) { if (m_SimpleLrc.IsValid) @@ -1686,6 +1810,7 @@ // Reset general and lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); + GUIControl.HideControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.ShowControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, ""); GUIControl.HideControl(GetID, CONTROL_LYRICWIDE_SELECTED); @@ -1870,8 +1995,6 @@ GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC editor"); - GUIControl.FocusControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); - // Lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); @@ -1889,6 +2012,7 @@ // LRC controls GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); + GUIControl.FocusControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); //GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS); for (int i = 0; i < m_TAG_IN_ROUND; i++) Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2009-11-25 19:10:25 UTC (rev 3187) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2009-11-27 17:38:18 UTC (rev 3188) @@ -9,7 +9,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MyLyrics</RootNamespace> <AssemblyName>MyLyrics</AssemblyName> - <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> <StartupObject> </StartupObject> <SignAssembly>false</SignAssembly> @@ -53,18 +53,34 @@ <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x64\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> + <OutputPath>bin\x64\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> <ItemGroup> <Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\MediaPortalSource\xbmc\bin\Debug\Core.dll</HintPath> + <HintPath>..\..\mp exes\Core.dll</HintPath> </Reference> <Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\MediaPortalSource\xbmc\bin\Debug\Databases.dll</HintPath> + <HintPath>..\..\mp exes\Databases.dll</HintPath> </Reference> <Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\MediaPortalSource\xbmc\bin\Debug\plugins\Windows\Dialogs.dll</HintPath> + <HintPath>..\..\mp exes\Dialogs.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> @@ -73,11 +89,11 @@ <Reference Include="System.Xml" /> <Reference Include="Utils, Version=2.2.2.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\MediaPortalSource\xbmc\bin\Debug\Utils.dll</HintPath> + <HintPath>..\..\mp exes\Utils.dll</HintPath> </Reference> <Reference Include="WindowPlugins, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\MediaPortalSource\xbmc\bin\Debug\plugins\Windows\WindowPlugins.dll</HintPath> + <HintPath>..\..\mp exes\WindowPlugins.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -188,6 +204,10 @@ <Project>{B0760CE8-086F-4301-9091-C9BE54F261FD}</Project> <Name>LyricsEngine</Name> </ProjectReference> + <ProjectReference Include="..\TranslateProvider\TranslateProvider.csproj"> + <Project>{1E5F3122-B9C3-4E05-8E42-0EC148A56174}</Project> + <Name>TranslateProvider</Name> + </ProjectReference> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> @@ -218,6 +238,6 @@ </Target> --> <PropertyGroup> - <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal\plugins\windows"</PostBuildEvent> + <PostBuildEvent>copy "$(TargetPath)" "C:\Program Files (x86)\Team MediaPortal\MediaPortal\plugins\Windows"</PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/MyLyrics/MyLyrics.sln =================================================================== --- trunk/plugins/MyLyrics/MyLyrics.sln 2009-11-25 19:10:25 UTC (rev 3187) +++ trunk/plugins/MyLyrics/MyLyrics.sln 2009-11-27 17:38:18 UTC (rev 3188) @@ -5,20 +5,38 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLyrics", "My Lyrics\MyLyrics.csproj", "{BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranslateProvider", "TranslateProvider\TranslateProvider.csproj", "{1E5F3122-B9C3-4E05-8E42-0EC148A56174}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B0760CE8-086F-4301-9091-C9BE54F261FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B0760CE8-086F-4301-9091-C9BE54F261FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0760CE8-086F-4301-9091-C9BE54F261FD}.Debug|x64.ActiveCfg = Debug|x64 + {B0760CE8-086F-4301-9091-C9BE54F261FD}.Debug|x64.Build.0 = Debug|x64 {B0760CE8-086F-4301-9091-C9BE54F261FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {B0760CE8-086F-4301-9091-C9BE54F261FD}.Release|Any CPU.Build.0 = Release|Any CPU + {B0760CE8-086F-4301-9091-C9BE54F261FD}.Release|x64.ActiveCfg = Release|x64 + {B0760CE8-086F-4301-9091-C9BE54F261FD}.Release|x64.Build.0 = Release|x64 {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Debug|x64.ActiveCfg = Debug|x64 + {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Debug|x64.Build.0 = Debug|x64 {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Release|Any CPU.ActiveCfg = Release|Any CPU {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Release|Any CPU.Build.0 = Release|Any CPU + {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Release|x64.ActiveCfg = Release|x64 + {BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}.Release|x64.Build.0 = Release|x64 + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Debug|x64.ActiveCfg = Debug|Any CPU + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Release|Any CPU.Build.0 = Release|Any CPU + {1E5F3122-B9C3-4E05-8E42-0EC148A56174}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Added: trunk/plugins/MyLyrics/TranslateProvider/App_bin/Documentation.chm =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyLyrics/TranslateProvider/App_bin/Documentation.chm ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.XML =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.XML (rev 0) +++ trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.XML 2009-11-27 17:38:18 UTC (rev 3188) @@ -0,0 +1,886 @@ +<?xml version="1.0"?> +<doc> + <assembly> + <name>GoogleTranslateAPI</name> + </assembly> + <members> + <member name="T:Google.API.HttpUtility"> + <summary> + Provides methods for encoding and decoding URLs when processing Web requests. This class cannot be inherited. + </summary> + </member> + <member name="M:Google.API.HttpUtility.HtmlDecode(System.String)"> + <summary> + Converts a string that has been HTML-encoded for HTTP transmission into a decoded string. + </summary> + <param name="s">The string to decode.</param> + <returns>A decoded string.</returns> + </member> + <member name="M:Google.API.HttpUtility.RemoveHtmlTags(System.String)"> + <summary> + Capture the text content from a html formatted string. + </summary> + <param name="s">The html formatted string.</param> + <returns>The plane text.</returns> + </member> + <member name="T:Google.API.Translate.TranslateFormat"> + <summary> + Translate format. + </summary> + </member> + <member name="T:Google.API.Enumeration`1"> + <summary> + The enumeration. Provide more static methods and properties for every concrete enumeration. + </summary> + <typeparam name="T">The type of concrete enumeration.</typeparam> + </member> + <member name="T:Google.API.Enumeration"> + <summary> + The enumeration. For parameters of Google APIs. + </summary> + </member> + <member name="M:Google.API.Enumeration.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration"/> class. + </summary> + <param name="value">The value.</param> + </member> + <member name="M:Google.API.Enumeration.#ctor(System.String,System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration"/> class. + </summary> + <param name="name">The name.</param> + <param name="value">The value.</param> + </member> + <member name="M:Google.API.Enumeration.#ctor(System.String,System.String,System.Boolean)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration"/> class. + </summary> + <param name="name">The name.</param> + <param name="value">The value.</param> + <param name="isDefault">if set to <c>true</c> it is default value.</param> + </member> + <member name="M:Google.API.Enumeration.op_Implicit(Google.API.Enumeration)~System.String"> + <summary> + Performs an implicit conversion from <see cref="T:Google.API.Enumeration"/> to <see cref="T:System.String"/>. + </summary> + <param name="enumeration">The enumeration.</param> + <returns>The result of the conversion.</returns> + </member> + <member name="M:Google.API.Enumeration.ToString"> + <summary> + Returns a <see cref="T:System.String"/> that represents this instance. + </summary> + <returns> + A <see cref="T:System.String"/> that represents this instance. + </returns> + </member> + <member name="M:Google.API.Enumeration.Equals(System.Object)"> + <summary> + Determines whether the specified <see cref="T:System.Object"/> is equal to this instance. + </summary> + <param name="obj">The <see cref="T:System.Object"/> to compare with this instance.</param> + <returns> + <c>true</c> if the specified <see cref="T:System.Object"/> is equal to this instance; otherwise, <c>false</c>. + </returns> + <exception cref="T:System.NullReferenceException"> + The <paramref name="obj"/> parameter is null. + </exception> + </member> + <member name="M:Google.API.Enumeration.GetHashCode"> + <summary> + Returns a hash code for this instance. + </summary> + <returns> + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + </returns> + </member> + <member name="P:Google.API.Enumeration.IsDefault"> + <summary> + Gets a value indicating whether this instance is default. + </summary> + <value> + <c>true</c> if this instance is default; otherwise, <c>false</c>. + </value> + </member> + <member name="P:Google.API.Enumeration.Value"> + <summary> + Gets the value. + </summary> + <value>The value.</value> + </member> + <member name="P:Google.API.Enumeration.Name"> + <summary> + Gets the name. + </summary> + <value>The name.</value> + </member> + <member name="M:Google.API.Enumeration`1.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration`1"/> class. + </summary> + <param name="value">The value.</param> + </member> + <member name="M:Google.API.Enumeration`1.#ctor(System.String,System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration`1"/> class. + </summary> + <param name="name">The name.</param> + <param name="value">The value.</param> + </member> + <member name="M:Google.API.Enumeration`1.#ctor(System.String,System.String,System.Boolean)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Enumeration`1"/> class. + </summary> + <param name="name">The name.</param> + <param name="value">The value.</param> + <param name="isDefault">if set to <c>true</c> it is default value.</param> + </member> + <member name="M:Google.API.Enumeration`1.GetDefault"> + <summary> + Gets the default enumeration. + </summary> + <returns>The default enumeration</returns> + </member> + <member name="M:Google.API.Enumeration`1.GetEnums"> + <summary> + Gets all enumerations. + </summary> + <returns>All enumerations</returns> + </member> + <member name="M:Google.API.Enumeration`1.Equals(`0)"> + <summary> + Indicates whether the current object is equal to another object of the same type. + </summary> + <param name="other">An object to compare with this object.</param> + <returns> + true if the current object is equal to the <paramref name="other"/> parameter; otherwise, false. + </returns> + </member> + <member name="M:Google.API.Enumeration`1.Initialize"> + <summary> + Initializes this instance. + </summary> + </member> + <member name="M:Google.API.Enumeration`1.Convert(System.String,System.Func{System.String,`0})"> + <summary> + Converts the specified value to this enumeration. + </summary> + <param name="value">The value.</param> + <param name="construct">The constructor function.</param> + <returns>The enumeration.</returns> + </member> + <member name="P:Google.API.Enumeration`1.Dictionary"> + <summary> + Gets the dictionary of value and enumeration. + </summary> + <value>The dictionary.</value> + </member> + <member name="F:Google.API.Translate.TranslateFormat.Text"> + <summary> + Text format. Default value. + </summary> + </member> + <member name="F:Google.API.Translate.TranslateFormat.Html"> + <summary> + Html format. + </summary> + </member> + <member name="M:Google.API.Translate.TranslateFormat.op_Implicit(System.String)~Google.API.Translate.TranslateFormat"> + <summary> + Performs an implicit conversion from <see cref="T:System.String"/> to <see cref="T:Google.API.Translate.TranslateFormat"/>. + </summary> + <param name="value">The value.</param> + <returns>The result of the conversion.</returns> + </member> + <member name="T:Google.API.Translate.Language"> + <summary> + Languanges for translate API. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Unknown"> + <summary> + The Unknown. Default value. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Afrikaans"> + <summary> + The Afrikaans. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Albanian"> + <summary> + The Albanian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Amharic"> + <summary> + The Amharic. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Arabic"> + <summary> + The Arabic. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Armenian"> + <summary> + The Armenian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Azerbaijani"> + <summary> + The Azerbaijani. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Basque"> + <summary> + The Basque. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Belarusian"> + <summary> + The Belarusian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Bengali"> + <summary> + The Bengali. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Bihari"> + <summary> + The Bihari. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Bulgarian"> + <summary> + The Bulgarian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Burmese"> + <summary> + The Burmese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Catalan"> + <summary> + The Catalan. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Cherokee"> + <summary> + The Cherokee. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Chinese"> + <summary> + The Chinese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.ChineseSimplified"> + <summary> + The Simplified Chinese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.ChineseTraditional"> + <summary> + The Traditional Chinese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Croatian"> + <summary> + The Croatian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Czech"> + <summary> + The Czech. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Danish"> + <summary> + The Danish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Dhivehi"> + <summary> + The Dhivehi. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Dutch"> + <summary> + The Dutch. + </summary> + </member> + <member name="F:Google.API.Translate.Language.English"> + <summary> + The English. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Esperanto"> + <summary> + The Esperanto. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Estonian"> + <summary> + The Estonian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Filipino"> + <summary> + The Filipino. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Finnish"> + <summary> + The Finnish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.French"> + <summary> + The French. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Galician"> + <summary> + The Galician. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Georgian"> + <summary> + The Georgian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.German"> + <summary> + The German. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Greek"> + <summary> + The Greek. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Guarani"> + <summary> + The Guarani. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Gujarati"> + <summary> + The Gujarati. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Hebrew"> + <summary> + The Hebrew. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Hindi"> + <summary> + The Hindi. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Hungarian"> + <summary> + The Hungarian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Icelandic"> + <summary> + The Icelandic. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Indonesian"> + <summary> + The Indonesian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Inuktitut"> + <summary> + The Inuktitut. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Irish"> + <summary> + The Irish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Italian"> + <summary> + The Italian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Japanese"> + <summary> + The Japanese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Kannada"> + <summary> + The Kannada. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Kazakh"> + <summary> + The Kazakh. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Khmer"> + <summary> + The Khmer. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Korean"> + <summary> + The Korean. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Kurdish"> + <summary> + The Kurdish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Kyrgyz"> + <summary> + The Kyrgyz. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Laothian"> + <summary> + The Laothian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Latvian"> + <summary> + The Latvian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Lithuanian"> + <summary> + The Lithuanian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Macedonian"> + <summary> + The Macedonian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Malay"> + <summary> + The Malay. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Malayalam"> + <summary> + The Malayalam. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Maltese"> + <summary> + The Maltese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Marathi"> + <summary> + The Marathi. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Mongolian"> + <summary> + The Mongolian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Nepali"> + <summary> + The Nepali. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Norwegian"> + <summary> + The Norwegian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Oriya"> + <summary> + The Oriya. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Pashto"> + <summary> + The Pashto. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Persian"> + <summary> + The Persian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Polish"> + <summary> + The Polish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Portuguese"> + <summary> + The Portuguese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Punjabi"> + <summary> + The Punjabi. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Romanian"> + <summary> + The Romanian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Russian"> + <summary> + The Russian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Sanskrit"> + <summary> + The Sanskrit. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Serbian"> + <summary> + The Serbian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Sindhi"> + <summary> + The Sindhi. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Sinhalese"> + <summary> + The Sinhalese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Slovak"> + <summary> + The Slovak. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Slovenian"> + <summary> + The Slovenian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Spanish"> + <summary> + The Spanish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Swahili"> + <summary> + The Swahili. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Swedish"> + <summary> + The Swedish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Tajik"> + <summary> + The Tajik. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Tamil"> + <summary> + The Tamil. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Tagalog"> + <summary> + The Tagalog. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Telugu"> + <summary> + The Telugu. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Thai"> + <summary> + The Thai. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Tibetan"> + <summary> + The Tibetan. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Turkish"> + <summary> + The Turkish. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Ukrainian"> + <summary> + The Ukrainian. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Urdu"> + <summary> + The Urdu. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Uzbek"> + <summary> + The Uzbek. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Uighur"> + <summary> + The Uighur. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Vietnamese"> + <summary> + The Vietnamese. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Welsh"> + <summary> + The Welsh. + </summary> + </member> + <member name="F:Google.API.Translate.Language.Yiddish"> + <summary> + The Yiddish. + </summary> + </member> + <member name="M:Google.API.Translate.Language.op_Implicit(System.String)~Google.API.Translate.Language"> + <summary> + Performs an implicit conversion from <see cref="T:System.String"/> to <see cref="T:Google.API.Translate.Language"/>. + </summary> + <param name="value">The value.</param> + <returns>The result of the conversion.</returns> + </member> + <member name="P:Google.API.Translate.Language.TranslatableCollection"> + <summary> + Gets translatable language collection. + </summary> + </member> + <member name="P:Google.API.Translate.Language.IsTranslatable"> + <summary> + Gets a value indicating whether this language is translatable. + </summary> + <value> + <c>true</c> if this language is translatable; otherwise, <c>false</c>. + </value> + </member> + <member name="T:Google.API.GoogleClient"> + <summary> + The abstract base class for all google service client classes. + </summary> + </member> + <member name="P:Google.API.GoogleClient.AcceptLanguage"> + <summary> + This optional argument supplies the host language of the application making the request. + If this argument is not present then the system will choose a value based on the value of the <b>Accept-Language</b> http header. If this header is not present, a value of <b>en</b> is assumed. + </summary> + <value>The accept language.</value> + </member> + <member name="P:Google.API.GoogleClient.ApiKey"> + <summary> + This optional argument supplies the application's key. + If specified, it must be a valid key associated with your site which is validated against the passed referer header. The advantage of supplying a key is so that we can identify and contact you should something go wrong with your application. Without a key, we will still take the same appropriate measures on our side, but we will not be able to contact you. It is definitely best for you to pass a key. + </summary> + <value>The API key.</value> + </member> + <member name="P:Google.API.GoogleClient.Referrer"> + <summary> + Gets or sets the http referrer header. + </summary> + <value>The referrer.</value> + <remarks>Applications MUST always include a valid and accurate http referer header in their requests.</remarks> + </member> + <member name="P:Google.API.GoogleClient.OpenTimeout"> + <summary> + Gets or sets the interval of time after which the open method, invoked by a communication object, times out. + </summary> + <returns>The <see cref="T:System.TimeSpan"/> that specifies the interval of time to wait for the open method to time out.</returns> + </member> + <member name="P:Google.API.GoogleClient.CloseTimeout"> + <summary> + Gets or sets the interval of time after which the close method, invoked by a communication object, times out. + </summary> + <returns>The <see cref="T:System.TimeSpan"/> that specifies the interval of time to wait for the close method to time out.</returns> + </member> + <member name="P:Google.API.GoogleClient.SendTimeout"> + <summary> + Gets or sets the interval of time after which the send method, invoked by a communication object, times out. + </summary> + <returns>The <see cref="T:System.TimeSpan"/> that specifies the interval of time to wait for the send method to time out.</returns> + </member> + <member name="P:Google.API.GoogleClient.ReceiveTimeout"> + <summary> + Gets or sets the interval of time after which the receive method, invoked by a communication object, times out. + </summary> + <returns>The <see cref="T:System.TimeSpan"/> that specifies the interval of time to wait for the receive method to time out.</returns> + </member> + <member name="P:Google.API.Translate.DetectData.LanguageCode"> + <summary> + Gets the detected language. + </summary> + </member> + <member name="P:Google.API.Translate.DetectData.IsReliable"> + <summary> + The reliability of the detect. + </summary> + </member> + <member name="P:Google.API.Translate.DetectData.Confidence"> + <summary> + Gets the confidence level of the detect. + </summary> + </member> + <member name="T:Google.API.Translate.TranslateClient"> + <summary> + The client for translate and detect. + </summary> + <remarks> + You can use public static fields of <see cref="T:Google.API.Translate.Language"/> and <see cref="T:Google.API.Translate.TranslateFormat"/> as your parameters. + </remarks> + <seealso cref="T:Google.API.Translate.Language"/> + <seealso cref="T:Google.API.Translate.TranslateFormat"/> + </member> + <member name="M:Google.API.Translate.TranslateClient.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.Translate.TranslateClient"/> class. + </summary> + <param name="referrer">The http referrer header.</param> + <remarks>Applications MUST always include a valid and accurate http referer header in their requests.</remarks> + </member> + <member name="M:Google.API.Translate.TranslateClient.Translate(System.String,System.String,System.String)"> + <summary> + Translate the text from <paramref name="from"/> to <paramref name="to"/>. + </summary> + <param name="text">The content to translate.</param> + <param name="from">The language of the original text. You can set it as <c>Language.Unknown</c> to the auto detect it.</param> + <param name="to">The target language you want to translate to.</param> + <returns>The translate result.</returns> + <exception cref="T:Google.API.GoogleAPIException">Translate failed.</exception> + <example> + This is the c# code example. + <code> + string text = "我喜欢跑步。"; + TranslateClient client = new TranslateClient(/* Enter the URL of your site here */); + string translated = client.Translate(text, Language.ChineseSimplified, Language.English); + Console.WriteLine(translated); + // I like running. + </code> + </example> + </member> + <member name="M:Google.API.Translate.TranslateClient.Translate(System.String,System.String,System.String,System.String)"> + <summary> + Translate the text from <paramref name="from"/> to <paramref name="to"/>. + </summary> + <param name="text">The content to translate.</param> + <param name="from">The language of the original text. You can set it as <c>Language.Unknown</c> to the auto detect it.</param> + <param name="to">The target language you want to translate to.</param> + <param name="format">The format of the text.</param> + <returns>The translate result.</returns> + <exception cref="T:Google.API.GoogleAPIException">Translate failed.</exception> + <example> + This is the c# code example. + <code> + string text = GetYourHtmlString(); + TranslateClient client = new TranslateClient(/* Enter the URL of your site here */); + string translated = client.Translate(text, Language.English, Language.French, TranslateFormat.Html); + </code> + </example> + </member> + <member name="M:Google.API.Translate.TranslateClient.TranslateAndDetect(System.String,System.String,System.String@)"> + <summary> + Translate the text to <paramref name="to"/> and auto detect which language the text is from. + </summary> + <param name="text">The content to translate.</param> + <param name="to">The target language you want to translate to.</param> + <param name="from">The detected language of the original text.</param> + <returns>The translate result.</returns> + <exception cref="T:Google.API.GoogleAPIException">Translate failed.</exception> + <example> + This is the c# code example. + <code> + string text = "Je t'aime."; + string from; + TranslateClient client = new TranslateClient(/* Enter the URL of your site here */); + string translated = client.TranslateAndDetect(text, Language.English, out from); + Language fromLanguage = from; + Console.WriteLine("\"{0}\" is \"{1}\" in {2}", text, translated, fromLanguage); + // "Je t'aime." is "I love you." in French. + </code> + </example> + </member> + <member name="M:Google.API.Translate.TranslateClient.TranslateAndDetect(System.String,System.String,System.String,System.String@)"> + <summary> + Translate the text to <paramref name="to"/> and auto detect which language the text is from. + </summary> + <param name="text">The content to translate.</param> + <param name="to">The target language you want to translate to.</param> + <param name="format">The format of the text.</param> + <param name="from">The detected language of the original text.</param> + <returns>The translate result.</returns> + <exception cref="T:Google.API.GoogleAPIException">Translate failed.</exception> + </member> + <member name="M:Google.API.Translate.TranslateClient.Detect(System.String,System.Boolean@,System.Double@)"> + <summary> + Detect the language for this text. + </summary> + <param name="text">The text you want to test.</param> + <param name="isReliable">Whether the result is reliable</param> + <param name="confidence">The confidence percent of the result.</param> + <returns>The detected language.</returns> + <exception cref="T:Google.API.GoogleAPIException">Detect failed.</exception> + </member> + <member name="T:Google.API.GoogleAPIException"> + <summary> + Google API exception. + </summary> + </member> + <member name="M:Google.API.GoogleAPIException.#ctor"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.GoogleAPIException"/> class. + </summary> + </member> + <member name="M:Google.API.GoogleAPIException.#ctor(System.String)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.GoogleAPIException"/> class with a specified error message. + </summary> + <param name="message">The message that describes the error.</param> + </member> + <member name="M:Google.API.GoogleAPIException.#ctor(System.String,System.Exception)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.GoogleAPIException"/> class with a specified error message and a reference to the inner exception that is the cause of this exception. + </summary> + <param name="message">The error message that explains the reason for the exception.</param> + <param name="innerException">The exception that is the cause of the current exception, or a null reference (<b>Nothing</b> in Visual Basic) if no inner exception is specified.</param> + </member> + <member name="M:Google.API.GoogleAPIException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> + <summary> + Initializes a new instance of the <see cref="T:Google.API.GoogleAPIException"/> class with serialized data. + </summary> + <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param> + <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param> + </member> + <member name="P:Google.API.Translate.TranslateData.TranslatedText"> + <summary> + Gets the translated text. + </summary> + </member> + <member name="P:Google.API.Translate.TranslateData.DetectedSourceLanguage"> + <summary> + Gets the source language. + </summary> + </member> + </members> +</doc> Added: trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyLyrics/TranslateProvider/App_bin/GoogleTranslateAPI.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2009-11-27 17:38:18 UTC (rev 3188) @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TranslateProvider")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("TranslateProvider")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6ceaa1b8-dd2d-40db-933d-b18468b4e960")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.cs =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.cs (rev 0) +++ trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.cs 2009-11-27 17:38:18 UTC (rev 3188) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Google.API.Translate; + +namespace TranslateProvider +{ + public class TranslateProvider + { + private TranslateClient _client = null; + private string _referrer = string.Empty; + + public TranslateProvider(string referrer) + { + _referrer = referrer; + _client = new TranslateClient(_referrer); + } + + public string Translate(string input, string translateTo, out string detectedLanguage, out bool reliable, out double confidence, string lineshiftMark) + { + string symbolToRepresentLineshift = "QQQQQ"; + input = input.Replace(lineshiftMark, symbolToRepresentLineshift); + + detectedLanguage = _client.Detect(input, out reliable, out confidence); + string translated = _client.Translate(input, detectedLanguage, translateTo); + + translated = translated.Replace(symbolToRepresentLineshift, lineshiftMark); + + //translated = translated.Replace("[*] ", lineshiftMark); + //translated = translated.Replace("[ *] ", lineshiftMark); + //translated = translated.Replace("[* ] ", lineshiftM... [truncated message content] |
From: <sa...@us...> - 2010-02-25 15:15:56
|
Revision: 3470 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3470&view=rev Author: saamand Date: 2010-02-25 15:15:47 +0000 (Thu, 25 Feb 2010) Log Message: ----------- Version 1.4.2.2 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/ICommand.cs trunk/plugins/MyLyrics/LyricsEngine/ILyricForm.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsWebClient.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/LyricsEngine/Web References/lrcfinder/Reference.cs trunk/plugins/MyLyrics/My Lyrics/Convert/ConvertFromXMLtoLyricsDatabase.cs trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs trunk/plugins/MyLyrics/My Lyrics/MediaPortalUtil.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/AddNewSong.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/ExportTags.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/ImportTags.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/MyLyricsSettings.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/TagReaderUtil.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt trunk/plugins/MyLyrics/Skin/Blue3wide/myLyrics.xml trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/TranslateProvider/TranslateProvider.cs trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.pdb trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/Refactor/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.pdb Modified: trunk/plugins/MyLyrics/LyricsEngine/ICommand.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/ICommand.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/ICommand.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; Modified: trunk/plugins/MyLyrics/LyricsEngine/ILyricForm.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/ILyricForm.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/ILyricForm.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,35 +1,14 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System; namespace LyricsEngine { public interface ILyricForm { - Object[] UpdateString - { - set; - } - Object[] UpdateStatus - { - set; - } - Object[] LyricFound - { - set; - } - Object[] LyricNotFound - { - set; - } - Object[] ThreadFinished - { - set; - } - string ThreadException - { - set; - } - + Object[] UpdateString { set; } + Object[] UpdateStatus { set; } + Object[] LyricFound { set; } + Object[] LyricNotFound { set; } + Object[] ThreadFinished { set; } + string ThreadException { set; } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,25 +1,25 @@ using System; -using System.Collections.Generic; -using System.Text; +using System.Collections; using System.IO; -using System.Collections; +using System.Text.RegularExpressions; namespace LyricsEngine.LRC { public class SimpleLRC { - string artist; - string title; - string offset; - string album; - string lyric; - bool isValid; + private string album; + private string artist; + private bool isValid; + private string lyricAsLRC; + private string lyricAsPlainLyric; - ArrayList lyricLines; + private ArrayList lyricLines; + private string offset; private ArrayList simpleLRCTimeAndLineArray; private ArrayList simpleLRCTimeAndLineArrayWithOffset; - SimpleLRCTimeAndLineCollection simpleLRCTimeAndLineCollection; - SimpleLRCTimeAndLineCollection simpleLRCTimeAndLineCollectionWithOffset; + private SimpleLRCTimeAndLineCollection simpleLRCTimeAndLineCollection; + private SimpleLRCTimeAndLineCollection simpleLRCTimeAndLineCollectionWithOffset; + private string title; /// <summary> @@ -32,8 +32,8 @@ TextReader textReader = new StreamReader(file); string line = ""; - lyricLines = new System.Collections.ArrayList(); - simpleLRCTimeAndLineArray = new System.Collections.ArrayList(); + lyricLines = new ArrayList(); + simpleLRCTimeAndLineArray = new ArrayList(); while ((line = textReader.ReadLine()) != null) { @@ -48,10 +48,17 @@ if (simpleLRCTimeAndLineArray.Count > 0) { - simpleLRCTimeAndLineCollection = new SimpleLRCTimeAndLineCollection((SimpleLRCTimeAndLine[])simpleLRCTimeAndLineArray.ToArray(typeof(SimpleLRCTimeAndLine))); + simpleLRCTimeAndLineCollection = + new SimpleLRCTimeAndLineCollection( + (SimpleLRCTimeAndLine[]) simpleLRCTimeAndLineArray.ToArray(typeof (SimpleLRCTimeAndLine))); isValid = true; } + if (!string.IsNullOrEmpty(lyricAsLRC)) + { + lyricAsPlainLyric = SimpleLRCFormat.LineLineRegex.Replace(lyricAsLRC, string.Empty); + } + textReader.Close(); } @@ -61,11 +68,11 @@ this.artist = artist; this.title = title; - string[] separators = new string[1] { "\n" }; + string[] separators = new string[1] {"\n"}; string[] lines = lyric.Split(separators, StringSplitOptions.None); string line = ""; - lyricLines = new System.Collections.ArrayList(); - simpleLRCTimeAndLineArray = new System.Collections.ArrayList(); + lyricLines = new ArrayList(); + simpleLRCTimeAndLineArray = new ArrayList(); for (int i = 0; i < lines.Length; i++) { @@ -81,11 +88,13 @@ if (simpleLRCTimeAndLineArray.Count > 0) { - simpleLRCTimeAndLineCollection = new SimpleLRCTimeAndLineCollection((SimpleLRCTimeAndLine[])simpleLRCTimeAndLineArray.ToArray(typeof(SimpleLRCTimeAndLine))); + simpleLRCTimeAndLineCollection = + new SimpleLRCTimeAndLineCollection( + (SimpleLRCTimeAndLine[]) simpleLRCTimeAndLineArray.ToArray(typeof (SimpleLRCTimeAndLine))); isValid = true; } - simpleLRCTimeAndLineArrayWithOffset = new System.Collections.ArrayList(); + simpleLRCTimeAndLineArrayWithOffset = new ArrayList(); int offsetInt = 0; @@ -93,22 +102,31 @@ { for (int i = 0; i < simpleLRCTimeAndLineArray.Count; i++) { - simpleLRCTimeAndLineArrayWithOffset.Add(((SimpleLRCTimeAndLine)simpleLRCTimeAndLineArray[i]).IncludeOffset(offsetInt)); + simpleLRCTimeAndLineArrayWithOffset.Add( + ((SimpleLRCTimeAndLine) simpleLRCTimeAndLineArray[i]).IncludeOffset(offsetInt)); } - simpleLRCTimeAndLineCollectionWithOffset = new SimpleLRCTimeAndLineCollection((SimpleLRCTimeAndLine[])simpleLRCTimeAndLineArrayWithOffset.ToArray(typeof(SimpleLRCTimeAndLine))); + simpleLRCTimeAndLineCollectionWithOffset = + new SimpleLRCTimeAndLineCollection( + (SimpleLRCTimeAndLine[]) + simpleLRCTimeAndLineArrayWithOffset.ToArray(typeof (SimpleLRCTimeAndLine))); } else { simpleLRCTimeAndLineCollectionWithOffset = simpleLRCTimeAndLineCollection; } + + if (!string.IsNullOrEmpty(lyricAsLRC)) + { + lyricAsPlainLyric = SimpleLRCFormat.LineLineRegex.Replace(lyricAsLRC, string.Empty); + } } private bool getLRCinfoFromFile(ref string line, bool originalLine) { - System.Text.RegularExpressions.Match m; + Match m; - if ((m = LRC.SimpleLRCFormat.LineLineRegex.Match(line)).Success) + if ((m = SimpleLRCFormat.LineLineRegex.Match(line)).Success) { line = line.Trim(); int index; @@ -122,7 +140,7 @@ // if a line with multiple timetags, only add the first which is the complete with all tags. if (originalLine) { - lyric += lineWithTimeAndNewLine; + lyricAsLRC += lineWithTimeAndNewLine; } // we update the line for potential further time-tags. This will natural not be regarded as an original line @@ -161,7 +179,7 @@ string lineTemp = lineWithNewLine; bool done = true; - while ((m = LRC.SimpleLRCFormat.LineLineRegex.Match(lineTemp)).Success) + while ((m = SimpleLRCFormat.LineLineRegex.Match(lineTemp)).Success) { lineTemp = lineTemp.Replace(m.Value, ""); done = false; @@ -172,31 +190,31 @@ return done; } - else if ((m = LRC.SimpleLRCFormat.ArtistLineStartRegex.Match(line)).Success) + else if ((m = SimpleLRCFormat.ArtistLineStartRegex.Match(line)).Success) { artist = line.Substring(m.Index + m.Length); - artist = LyricsEngine.LyricUtil.CapatalizeString(artist.Substring(0, artist.LastIndexOf("]"))); + artist = LyricUtil.CapatalizeString(artist.Substring(0, artist.LastIndexOf("]"))); return true; } - else if ((m = LRC.SimpleLRCFormat.TitleLineStartRegex.Match(line)).Success) + else if ((m = SimpleLRCFormat.TitleLineStartRegex.Match(line)).Success) { title = line.Substring(m.Index + m.Length); - title = LyricsEngine.LyricUtil.CapatalizeString(title.Substring(0, title.LastIndexOf("]"))); + title = LyricUtil.CapatalizeString(title.Substring(0, title.LastIndexOf("]"))); return true; } - else if ((m = LRC.SimpleLRCFormat.AlbumLineStartRegex.Match(line)).Success) + else if ((m = SimpleLRCFormat.AlbumLineStartRegex.Match(line)).Success) { album = line.Substring(m.Index + m.Length); - album = LyricsEngine.LyricUtil.CapatalizeString((album.Substring(0, album.LastIndexOf("]")))); + album = LyricUtil.CapatalizeString((album.Substring(0, album.LastIndexOf("]")))); return true; } - else if ((m = LRC.SimpleLRCFormat.OffsetLineStartRegex.Match(line)).Success) + else if ((m = SimpleLRCFormat.OffsetLineStartRegex.Match(line)).Success) { offset = line.Substring(m.Index + m.Length); - offset = LyricsEngine.LyricUtil.CapatalizeString((offset.Substring(0, offset.LastIndexOf("]")))); + offset = LyricUtil.CapatalizeString((offset.Substring(0, offset.LastIndexOf("]")))); return true; } else @@ -206,6 +224,7 @@ } #region properties + public string Artist { get { return artist; } @@ -226,11 +245,16 @@ get { return offset; } } - public string Lyric + public string LyricAsLRC { - get { return lyric; } + get { return lyricAsLRC; } } + public string LyricAsPlainLyric + { + get { return lyricAsPlainLyric; } + } + public bool IsValid { get { return isValid; } @@ -243,4 +267,4 @@ #endregion } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,16 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; using System.Text.RegularExpressions; namespace LyricsEngine.LRC { public static class SimpleLRCFormat { - public static Regex ArtistLineStartRegex = new Regex(@"\[ar\w*\:", RegexOptions.IgnoreCase); - public static Regex TitleLineStartRegex = new Regex(@"\[ti\w*\:", RegexOptions.IgnoreCase); - public static Regex OffsetLineStartRegex = new Regex(@"\[offset\w*\:", RegexOptions.IgnoreCase); public static Regex AlbumLineStartRegex = new Regex(@"\[al\w*\:", RegexOptions.IgnoreCase); + public static Regex ArtistLineStartRegex = new Regex(@"\[ar\w*\:", RegexOptions.IgnoreCase); public static Regex LineLineRegex = new Regex(@"\[\d+:\d+\.*\d*\]"); + public static Regex OffsetLineStartRegex = new Regex(@"\[offset\w*\:", RegexOptions.IgnoreCase); + public static Regex TitleLineStartRegex = new Regex(@"\[ti\w*\:", RegexOptions.IgnoreCase); } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,19 +1,14 @@ using System; using System.Collections; -using System.Text; -using System.IO; -using System.IO.IsolatedStorage; namespace LyricsEngine.LRC { public class SimpleLRCTimeAndLineCollection : IEnumerable, ICollection { - private object[] items; public SimpleLRCTimeAndLineCollection() { - } public SimpleLRCTimeAndLineCollection(object[] array) @@ -22,38 +17,13 @@ Sort(items); } - public int GetSimpleLRCTimeAndLineIndex(long time) - { - if (time <= ((SimpleLRCTimeAndLine)items[0]).Time) - { - return 0; - } - - for (int i = 1; i < items.Length; i++) - { - if (((SimpleLRCTimeAndLine)items[i - 1]).Time < time && time <= ((SimpleLRCTimeAndLine)items[i]).Time) - { - return i; - } - } - - if (time > ((SimpleLRCTimeAndLine)items[items.Length - 1]).Time) - { - return items.Length - 1; - } - else - { - throw (new IndexOutOfRangeException("IndexOutOfRangeException in GetSimpleLRCTimeAndLineIndex")); - } - } - public SimpleLRCTimeAndLine this[int index] { get { if (index < items.Length) { - return (SimpleLRCTimeAndLine)items[index]; + return (SimpleLRCTimeAndLine) items[index]; } else return null; @@ -61,13 +31,16 @@ } #region IEnumerable implementation + public IEnumerator GetEnumerator() { return new Enumerator(items); } + #endregion #region ICollection implementation + public int Count { get { return items.Length; } @@ -83,13 +56,15 @@ get { throw new Exception("The method or operation is not implemented."); } } - public void CopyTo(Array array, int index) + public void CopyTo(Array array, int index) { throw new Exception("The method or operation is not implemented."); } + #endregion #region Enumerator class, IEnumerator implementation + private class Enumerator : IEnumerator { private int cursor; @@ -102,6 +77,8 @@ cursor = -1; } + #region IEnumerator Members + public bool MoveNext() { ++cursor; @@ -132,27 +109,61 @@ return elements[cursor]; } } + + #endregion } + #endregion #region SortAfterTimeClass class, IComparer implementation + private class SortAfterTimeClass : IComparer { // Calls CaseInsensitiveComparer.Compare with the parameters reversed. + + #region IComparer Members + int IComparer.Compare(Object x, Object y) { return ((new CaseInsensitiveComparer()).Compare(y, x)); } + #endregion } + #endregion + public int GetSimpleLRCTimeAndLineIndex(long time) + { + if (time <= ((SimpleLRCTimeAndLine) items[0]).Time) + { + return 0; + } + + for (int i = 1; i < items.Length; i++) + { + if (((SimpleLRCTimeAndLine) items[i - 1]).Time < time && time <= ((SimpleLRCTimeAndLine) items[i]).Time) + { + return i; + } + } + + if (time > ((SimpleLRCTimeAndLine) items[items.Length - 1]).Time) + { + return items.Length - 1; + } + else + { + throw (new IndexOutOfRangeException("IndexOutOfRangeException in GetSimpleLRCTimeAndLineIndex")); + } + } + public string[] Copy() { - string[] array = new string[this.Count]; - for (int i = 0; i < this.Count; i++) + string[] array = new string[Count]; + for (int i = 0; i < Count; i++) { - SimpleLRCTimeAndLine timeLine = (SimpleLRCTimeAndLine)items[i]; + SimpleLRCTimeAndLine timeLine = (SimpleLRCTimeAndLine) items[i]; array.SetValue(timeLine.Line, i); } return array; @@ -164,5 +175,4 @@ Array.Sort(items, myComparer); } } -} - +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using System.Diagnostics; using System.IO; @@ -8,18 +6,30 @@ { public static class LyricDiagnostics { - private static TraceSource ts; - private static Stopwatch stopWatch; private static string logFileName = ""; private static FileStream objStream; private static TextWriterTraceListener objTraceListener; + private static Stopwatch stopWatch; + private static TraceSource ts; + public static TraceSource TraceSource + { + get + { + if (ts != null) + { + ts.Flush(); + return ts; + } + else return null; + } + } + public static void OpenLog(string url) { try { - logFileName = url; if (ts == null) @@ -31,7 +41,10 @@ { file.Delete(); } - catch { }; + catch + { + } + ; } ts = new TraceSource("MyLyrics"); @@ -44,7 +57,9 @@ } } catch (Exception e) - { ;} + { + ; + } } public static void Dispose() @@ -62,9 +77,11 @@ objTraceListener.Close(); objTraceListener.Dispose(); } - catch { } + catch + { + } - if (System.IO.File.Exists(logFileName)) + if (File.Exists(logFileName)) { FileStream file = new FileStream(logFileName, FileMode.OpenOrCreate, FileAccess.Write); file.Close(); @@ -72,18 +89,6 @@ } } - public static TraceSource TraceSource - { - get { - if (ts != null) - { - ts.Flush(); - return ts; - } - else return null; - } - } - private static void StartTimer() { stopWatch = new Stopwatch(); @@ -103,12 +108,12 @@ if (stopWatch != null) { long time = stopWatch.ElapsedMilliseconds; - long sec = time / 1000; - long ms = (time / 100) - (sec * 10); + long sec = time/1000; + long ms = (time/100) - (sec*10); string str = ""; str += (sec < 100) ? "0" : ""; str += (sec < 10) ? "0" : ""; - str += sec.ToString() + "." + ms.ToString(); + str += sec + "." + ms; return str + ": "; } else @@ -117,4 +122,4 @@ } } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; @@ -7,21 +6,28 @@ { public class LyricUtil { - static string[] parenthesesAndAlike = new string[6] { "(album", "(acoustic", "(live", "(radio", "[", "{" }; - static string[] charsToDelete = new string[11] { ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" /*, "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß" */ }; + private static readonly string[] charsToDelete = new string[11] + { + ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" + /*, "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß" */ + }; + private static readonly string[] parenthesesAndAlike = new string[6] + {"(album", "(acoustic", "(live", "(radio", "[", "{"}; + // capatalize string and make ready for XML public static string CapatalizeString(string s) { s = s.Replace("\"", ""); - char[] space = new char[1] { ' ' }; + char[] space = new char[1] {' '}; string[] words = s.Split(space, StringSplitOptions.RemoveEmptyEntries); StringBuilder result = new StringBuilder(); for (int i = 0; i < words.Length; i++) { - result.Append(words[i].Substring(0, 1).ToUpper() + (words[i].Length > 1 ? words[i].Substring(1, words[i].Length - 1).ToLower() : "") + " "); + result.Append(words[i].Substring(0, 1).ToUpper() + + (words[i].Length > 1 ? words[i].Substring(1, words[i].Length - 1).ToLower() : "") + " "); } return result.ToString().Trim(); } @@ -96,7 +102,6 @@ foreach (string findValue in find) { - if (findValue != "") { lyrics = lyrics.Replace(findValue, replace[valueIndex]); @@ -108,4 +113,4 @@ return lyrics; } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,45 +1,33 @@ -using System; -using System.Drawing; +using System; using System.Collections; -using System.ComponentModel; -using System.Windows.Forms; -using System.Data; using System.Threading; -using System.IO; -using System.Diagnostics; -using LyricsEngine; [assembly: CLSCompliant(true)] + namespace LyricsEngine { public class LyricsController : IDisposable { - private ILyricForm m_Form; - - // status - private int m_noOfLyricsToSearch; - private int m_noOfLyricsSearched; - private int m_noOfLyricsFound; - private int m_noOfLyricsNotFound; - - private int m_noOfCurrentSearches; - - private bool m_StopSearches; - + private string[] lyricsSites; private bool m_allowAllToComplete; private bool m_automaticUpdate; - ArrayList threadList = new ArrayList(); - // Main thread sets this event to stop LyricController - ManualResetEvent m_EventStop_LyricController; + private ManualResetEvent m_EventStop_LyricController; // The LyricController sets this when all lyricSearch threads have been aborted - ManualResetEvent m_EventStopped_LyricController; + private ManualResetEvent m_EventStopped_LyricController; - private string[] lyricsSites; private string[] m_findArray; + private ILyricForm m_Form; + private int m_noOfCurrentSearches; + private int m_noOfLyricsFound; + private int m_noOfLyricsNotFound; + private int m_noOfLyricsSearched; + private int m_noOfLyricsToSearch; private string[] m_replaceArray; + private bool m_StopSearches; + private ArrayList threadList = new ArrayList(); public LyricsController(ILyricForm mainForm, ManualResetEvent eventStopThread, @@ -47,11 +35,10 @@ bool allowAllToComplete, bool automaticUpdate, string find, string replace) { + m_Form = mainForm; + m_allowAllToComplete = allowAllToComplete; + m_automaticUpdate = automaticUpdate; - this.m_Form = mainForm; - this.m_allowAllToComplete = allowAllToComplete; - this.m_automaticUpdate = automaticUpdate; - m_noOfLyricsToSearch = 1; m_noOfLyricsSearched = 0; m_noOfLyricsFound = 0; @@ -68,7 +55,7 @@ sitesArrayList.Add(site); } } - this.lyricsSites = (string[])sitesArrayList.ToArray(typeof(string)); + lyricsSites = (string[]) sitesArrayList.ToArray(typeof (string)); LyricSearch.LyricsSites = lyricsSites; @@ -86,47 +73,41 @@ } } - - public void Run() + public bool StopSearches { - // check if thread is cancelled - while (true) + get { return m_StopSearches; } + set { - Thread.Sleep(100); - - // check if thread is cancelled - if (m_EventStop_LyricController.WaitOne()) + if (value == true) { - // clean-up operations may be placed here - for (int i=0; i<threadList.Count; i++) - { - ((Thread)threadList[i]).Abort(); - } - - bool stillThreadsAlive = (threadList.Count > 0 ? true : false); - while (stillThreadsAlive) - { - for (int i = 0; i < threadList.Count; i++) - { - stillThreadsAlive = false; ; - if (((Thread)threadList[i]).IsAlive) - stillThreadsAlive = true; - } - } - - m_EventStopped_LyricController.Set(); - break; + m_StopSearches = true; + //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty); } + else + { + m_StopSearches = false; + } } } + public int NoOfLyricsToSearch + { + set { m_noOfLyricsToSearch = value; } + } + public int NoOfCurrentSearches + { + get { return m_noOfCurrentSearches; } + } + + #region IDisposable Members + public void Dispose() { // clean-up operations may be placed here for (int i = 0; i < threadList.Count; i++) { - ((Thread)threadList[i]).Abort(); + ((Thread) threadList[i]).Abort(); } bool stillThreadsAlive = true; @@ -135,7 +116,7 @@ for (int i = 0; i < threadList.Count; i++) { stillThreadsAlive = false; - if (((Thread)threadList[i]).IsAlive) + if (((Thread) threadList[i]).IsAlive) stillThreadsAlive = true; } @@ -147,6 +128,42 @@ FinishThread("", "", "The search has ended.", ""); } + #endregion + + public void Run() + { + // check if thread is cancelled + while (true) + { + Thread.Sleep(100); + + // check if thread is cancelled + if (m_EventStop_LyricController.WaitOne()) + { + // clean-up operations may be placed here + for (int i = 0; i < threadList.Count; i++) + { + ((Thread) threadList[i]).Abort(); + } + + bool stillThreadsAlive = (threadList.Count > 0 ? true : false); + while (stillThreadsAlive) + { + for (int i = 0; i < threadList.Count; i++) + { + stillThreadsAlive = false; + ; + if (((Thread) threadList[i]).IsAlive) + stillThreadsAlive = true; + } + } + + m_EventStopped_LyricController.Set(); + break; + } + } + } + public void AddNewLyricSearch(string artist, string title, string strippedArtistName) { if (lyricsSites.Length > 0 && !string.IsNullOrEmpty(artist) && !string.IsNullOrEmpty(title)) @@ -155,13 +172,16 @@ // create worker thread instance ThreadStart threadInstance = delegate - { - LyricSearch lyricSearch = new LyricSearch(this, artist, title, strippedArtistName, m_allowAllToComplete, m_automaticUpdate); - lyricSearch.Run(); - }; + { + LyricSearch lyricSearch = new LyricSearch(this, artist, title, + strippedArtistName, + m_allowAllToComplete, + m_automaticUpdate); + lyricSearch.Run(); + }; Thread lyricSearchThread = new Thread(threadInstance); - lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window + lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window lyricSearchThread.IsBackground = true; lyricSearchThread.Start(); threadList.Add(lyricSearchThread); @@ -173,10 +193,9 @@ } - internal void UpdateString(String message, String site) { - m_Form.UpdateString = new Object[] { message, site }; + m_Form.UpdateString = new Object[] {message, site}; } internal void StatusUpdate(string artist, string title, string site, bool lyricFound) @@ -188,7 +207,11 @@ ++m_noOfLyricsSearched; - m_Form.UpdateStatus = new Object[] { m_noOfLyricsToSearch, m_noOfLyricsSearched, m_noOfLyricsFound, m_noOfLyricsNotFound }; + m_Form.UpdateStatus = new Object[] + { + m_noOfLyricsToSearch, m_noOfLyricsSearched, m_noOfLyricsFound, + m_noOfLyricsNotFound + }; if ((m_noOfLyricsSearched >= m_noOfLyricsToSearch)) { @@ -199,14 +222,13 @@ internal void LyricFound(String lyricStrings, String artist, String title, String site) { - string cleanLyric = LyricUtil.FixLyrics(lyricStrings, m_findArray, m_replaceArray); --m_noOfCurrentSearches; if (m_allowAllToComplete || m_StopSearches == false) { - m_Form.LyricFound = new Object[] { cleanLyric, artist, title, site }; + m_Form.LyricFound = new Object[] {cleanLyric, artist, title, site}; StatusUpdate(artist, title, site, true); } } @@ -217,7 +239,7 @@ if (m_allowAllToComplete || m_StopSearches == false) { - m_Form.LyricNotFound = new Object[] { artist, title, message, site }; + m_Form.LyricNotFound = new Object[] {artist, title, message, site}; StatusUpdate(artist, title, site, false); } } @@ -231,38 +253,12 @@ { Thread.Sleep(50); } - m_Form.ThreadFinished = new Object[] { artist, title, message, site }; + m_Form.ThreadFinished = new Object[] {artist, title, message, site}; } internal void ThreadException(String s) { m_Form.ThreadException = s; } - - public bool StopSearches - { - get { return m_StopSearches; } - set { - if (value == true) - { - m_StopSearches = true; - //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty); - } - else - { - m_StopSearches = false; - } - } - } - - public int NoOfLyricsToSearch - { - set { m_noOfLyricsToSearch = value; } - } - - public int NoOfCurrentSearches - { - get { return m_noOfCurrentSearches; } - } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,6 +1,6 @@ using System; +using System.Collections; using System.Collections.Generic; -using System.Text; using System.Runtime.Serialization; namespace MyLyrics @@ -8,11 +8,11 @@ [Serializable] public class LyricsDatabase : IDictionary<string, LyricsItem>, ISerializable { - private DateTime created; + private readonly DateTime created; + + private readonly Dictionary<string, LyricsItem> db; private DateTime lastModified; - private Dictionary<string, LyricsItem> db; - public LyricsDatabase() { created = DateTime.Now; @@ -21,10 +21,11 @@ } #region Serialization methods + protected LyricsDatabase(SerializationInfo info, StreamingContext context) { Dictionary<string, LyricsItem> dbTemp = new Dictionary<string, LyricsItem>(); - db = (Dictionary<string, LyricsItem>)info.GetValue("db", dbTemp.GetType()); + db = (Dictionary<string, LyricsItem>) info.GetValue("db", dbTemp.GetType()); created = info.GetDateTime("created"); lastModified = info.GetDateTime("lastModified"); } @@ -35,13 +36,9 @@ info.AddValue("created", created); info.AddValue("lastModified", lastModified); } + #endregion - public void SetLastModified() - { - lastModified = DateTime.Now; - } - #region IDictionary<string,LyricsItem> Members public void Add(string key, LyricsItem value) @@ -76,20 +73,10 @@ public LyricsItem this[string key] { - get - { - return db[key]; - } - set - { - db[key] = value; - } + get { return db[key]; } + set { db[key] = value; } } - #endregion - - #region ICollection<KeyValuePair<string,LyricsItem>> Members - public void Add(KeyValuePair<string, LyricsItem> item) { db.Add(item.Key, item.Value); @@ -125,10 +112,6 @@ return db.Remove(item.Key); } - #endregion - - #region IEnumerable<KeyValuePair<string,LyricsItem>> Members - public IEnumerator<KeyValuePair<string, LyricsItem>> GetEnumerator() { foreach (KeyValuePair<string, LyricsItem> kvp in db) @@ -137,11 +120,7 @@ } } - #endregion - - #region IEnumerable Members - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { foreach (KeyValuePair<string, LyricsItem> kvp in db) { @@ -150,5 +129,10 @@ } #endregion + + public void SetLastModified() + { + lastModified = DateTime.Now; + } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; -using System.Runtime.Serialization; -using System.Text.RegularExpressions; namespace MyLyrics { @@ -10,9 +6,9 @@ public class LyricsItem { private string artist; - private string title; private string lyrics; private string source; + private string title; public LyricsItem(string artist, string title, string lyrics, string source) { @@ -23,6 +19,7 @@ } #region Properties + public string Artist { get { return artist; } @@ -46,6 +43,7 @@ get { return source; } set { source = value; } } + #endregion } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2010-02-25 15:15:47 UTC (rev 3470) @@ -2,7 +2,7 @@ <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> + <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{B0760CE8-086F-4301-9091-C9BE54F261FD}</ProjectGuid> <OutputType>Library</OutputType> @@ -110,6 +110,7 @@ <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Reference.map</DependentUpon> + <SubType>Component</SubType> </Compile> <Compile Include="LyricsSites\LyricWiki.cs" /> </ItemGroup> Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,30 +1,24 @@ using System; -using System.Collections.Generic; -using System.Text; using System.IO; -using System.Diagnostics; using System.Net; +using System.Text; using System.Threading; using System.Timers; +using Timer=System.Timers.Timer; namespace LyricsEngine.LyricSites { - class Actionext + internal class Actionext { - string lyric = ""; - bool complete; - System.Timers.Timer timer; - int timeLimit; + private bool complete; + private string lyric = ""; + private int timeLimit; + private Timer timer; - public string Lyric - { - get { return lyric; } - } - public Actionext(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; - timer = new System.Timers.Timer(); + timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = artist.Replace(" ", "_"); @@ -36,7 +30,8 @@ return; } - string urlString = "http://www.actionext.com/names_" + artist[0] + "/" + artist + "_lyrics/" + title + ".html"; + string urlString = "http://www.actionext.com/names_" + artist[0] + "/" + artist + "_lyrics/" + title + + ".html"; urlString = urlString.ToLower(); LyricsWebClient client = new LyricsWebClient(); @@ -47,7 +42,7 @@ timer.Start(); Uri uri = new Uri(urlString); - client.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(callbackMethod); + client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) @@ -58,23 +53,28 @@ } else { - System.Threading.Thread.Sleep(300); + Thread.Sleep(300); } } } + public string Lyric + { + get { return lyric; } + } + private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; StringBuilder lyricTemp = 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.Default); string line = ""; @@ -115,6 +115,7 @@ lyricTemp.Replace("<br>", Environment.NewLine); lyricTemp.Replace(",<br />", Environment.NewLine); lyricTemp.Replace("<br />", Environment.NewLine); + lyricTemp.Replace("&", "&"); lyric = lyricTemp.ToString().Trim(); @@ -143,7 +144,7 @@ } } - void timer_Elapsed(object sender, ElapsedEventArgs e) + private void timer_Elapsed(object sender, ElapsedEventArgs e) { timer.Stop(); timer.Close(); @@ -154,4 +155,4 @@ Thread.CurrentThread.Abort(); } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,30 +1,24 @@ using System; -using System.Collections.Generic; -using System.Text; using System.IO; -using System.Diagnostics; using System.Net; +using System.Text; using System.Threading; using System.Timers; +using Timer=System.Timers.Timer; namespace LyricsEngine.LyricSites { - class HotLyrics + internal class HotLyrics { - string lyric = ""; private bool complete; - System.Timers.Timer timer; - int timeLimit; + private string lyric = ""; + private int timeLimit; + private Timer timer; - public string Lyric - { - get { return lyric; } - } - public HotLyrics(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { - this.timeLimit = timeLimit / 2; - timer = new System.Timers.Timer(); + this.timeLimit = timeLimit/2; + timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.CapatalizeString(artist); @@ -98,7 +92,7 @@ timer.Start(); Uri uri = new Uri(urlString); - client.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(callbackMethod); + client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) @@ -109,23 +103,28 @@ } else { - System.Threading.Thread.Sleep(300); + Thread.Sleep(300); } } } + public string Lyric + { + get { return lyric; } + } + private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; StringBuilder lyricTemp = 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.Default); string line = ""; @@ -173,6 +172,7 @@ lyricTemp.Replace("</p>", ""); lyricTemp.Replace("<BR>", ""); lyricTemp.Replace("<br/>", "\r\n"); + lyricTemp.Replace("&", "&"); lyric = lyricTemp.ToString().Trim(); @@ -207,7 +207,7 @@ } } - void timer_Elapsed(object sender, ElapsedEventArgs e) + private void timer_Elapsed(object sender, ElapsedEventArgs e) { timer.Stop(); timer.Close(); @@ -218,4 +218,4 @@ Thread.CurrentThread.Abort(); } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,29 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Threading; -using LyricsEngine.lrcfinder; -using LyricsEngine; +using System; using System.Data; -using System.Diagnostics; using System.Net; namespace LyricsEngine.LyricSites { public class LrcFinder { - private lrcfinder.LrcFinder lrcFinder; - private string artist = ""; - private string title = ""; public static bool Abort; public static string Domain = null; public static bool WebExceptionOccured = false; + private string artist = ""; + private lrcfinder.LrcFinder lrcFinder; + private string title = ""; public LrcFinder() { - } public string FindLRC(string artist, string title) @@ -123,7 +116,6 @@ try { - string url = GetUrl(); if (url == null) @@ -181,7 +173,6 @@ try { - if (string.IsNullOrEmpty(Domain)) { string[] domains = lrcFinder.NewDomain(); @@ -197,6 +188,5 @@ return null; } } - } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,49 +1,45 @@ using System; -using System.Collections.Generic; -using System.Text; using System.IO; -using System.Diagnostics; using System.Net; +using System.Text; using System.Threading; using System.Timers; +using Timer=System.Timers.Timer; namespace LyricsEngine.LyricSites { - class LyrDB + internal class LyrDB { - string lyric = ""; - bool complete; - System.Timers.Timer timer; - int timeLimit; + private bool complete; + private string lyric = ""; private ManualResetEvent m_EventStop_SiteSearches; + private int timeLimit; + private Timer timer; - public string Lyric - { - get { return lyric; } - } - public LyrDB(string artist, string title, ManualResetEvent eventStop_SiteSearches, int timeLimit) { this.timeLimit = timeLimit; - timer = new System.Timers.Timer(); + 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); - + 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 System.Net.OpenReadCompletedEventHandler(CallbackMethodSearch); + client.OpenReadCompleted += new OpenReadCompletedEventHandler(CallbackMethodSearch); client.OpenReadAsync(uri); while (complete == false) @@ -54,16 +50,21 @@ } else { - System.Threading.Thread.Sleep(300); + Thread.Sleep(300); } } } + public string Lyric + { + get { return lyric; } + } + private void CallbackMethodSearch(object sender, OpenReadCompletedEventArgs e) { StringBuilder lyricTemp = new StringBuilder(); - LyricsWebClient client = (LyricsWebClient)sender; + LyricsWebClient client = (LyricsWebClient) sender; Stream reply = null; StreamReader sr = null; @@ -71,7 +72,7 @@ try { - reply = (Stream)e.Result; + reply = (Stream) e.Result; sr = new StreamReader(reply, Encoding.Default); string result = sr.ReadToEnd(); @@ -89,7 +90,7 @@ LyricsWebClient client2 = new LyricsWebClient(); Uri uri = new Uri(urlString); - client2.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(CallbackMethodGetLyric); + client2.OpenReadCompleted += new OpenReadCompletedEventHandler(CallbackMethodGetLyric); client2.OpenReadAsync(uri); while (complete == false) @@ -100,7 +101,7 @@ } else { - System.Threading.Thread.Sleep(300); + Thread.Sleep(300); } } } @@ -127,29 +128,19 @@ { StringBuilder lyricTemp = 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.Default); lyric = sr.ReadToEnd().Trim(); lyric = lyric.Replace("*", ""); - - //lyricTemp.Replace("<br>", Environment.NewLine); - //lyricTemp.Replace(",<br />", Environment.NewLine); - //lyricTemp.Replace("<br />", Environment.NewLine); - - //lyric = lyricTemp.ToString().Trim(); - - //if (lyric.Contains("but we do not have the lyrics")) - //{ - // lyric = "Not found"; - //} + lyric = lyric.Replace("&", "&"); } catch { @@ -171,7 +162,7 @@ } - void timer_Elapsed(object sender, ElapsedEventArgs e) + private void timer_Elapsed(object sender, ElapsedEventArgs e) { timer.Stop(); timer.Close(); @@ -182,4 +173,4 @@ Thread.CurrentThread.Abort(); } } -} +} \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs 2010-02-24 20:19:47 UTC (rev 3469) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs 2010-02-25 15:15:47 UTC (rev 3470) @@ -1,30 +1,24 @@ using System; -using System.Collections.Generic; -using System.Text; using System.IO; -using System.Diagnostics; using System.Net; +using System.Text; using System.Threading; using System.Timers; +using Timer=System.Timers.Timer; namespace LyricsEngine.LyricSites { - class LyricWiki + internal class LyricWiki { - string lyric = ""; private bool complete; - System.Timers.Timer timer; - int timeLimit; + private string lyric = ""; + private int timeLimit; + private Timer timer; - public string Lyric - { - get { return lyric; } - } - public LyricWiki(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { - this.timeLimit = timeLimit / 2; - timer = new System.Timers.Timer(); + this.timeLimit = timeLimit/2; + timer = new Timer(); artist = LyricUtil.RemoveFeatComment(artist); artist = LyricUtil.CapatalizeString(artist); @@ -50,7 +44,7 @@ timer.Start(); Uri uri = new Uri(urlString); - client.OpenReadCompleted += new System.Net.OpenReadCompletedEventHandler(callbackMethod); + client.OpenReadCompleted += new OpenReadCompletedEventHandler(callbackMethod); client.OpenReadAsync(uri); while (complete == false) @@ -61,27 +55,32 @@ } else... [truncated message content] |
From: <sa...@us...> - 2010-03-01 19:15:27
|
Revision: 3474 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3474&view=rev Author: saamand Date: 2010-03-01 16:20:24 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Version 1.4.2.3 (beta) Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/bin/Debug/TranslateProvider.pdb trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.pdb Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2010-02-25 16:13:33 UTC (rev 3473) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2010-03-01 16:20:24 UTC (rev 3474) @@ -12,15 +12,14 @@ /*, "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß" */ }; - private static readonly string[] parenthesesAndAlike = new string[6] - {"(album", "(acoustic", "(live", "(radio", "[", "{"}; + private static readonly string[] parenthesesAndAlike = new string[3] { "(", "[", "{" }; // capatalize string and make ready for XML public static string CapatalizeString(string s) { s = s.Replace("\"", ""); - char[] space = new char[1] {' '}; + char[] space = new char[1] { ' ' }; string[] words = s.Split(space, StringSplitOptions.RemoveEmptyEntries); StringBuilder result = new StringBuilder(); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-02-25 16:13:33 UTC (rev 3473) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-01 16:20:24 UTC (rev 3474) @@ -18,7 +18,7 @@ using MediaPortal.Playlists; using MediaPortal.Profile; using MediaPortal.TagReader; -using Timer=System.Timers.Timer; +using Timer = System.Timers.Timer; namespace MyLyrics { @@ -102,14 +102,16 @@ private bool _useLyricWiki; private bool _ValidLrcLyric; - // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) + // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) private Timer _WriteTagTimer; #endregion - [SkinControl((int) GUI_LRC_Controls.CONTROL_ART_ALBUMART)] protected GUIImage GUIelement_ImgCoverArt; - [SkinControl((int) GUI_LRC_Controls.CONTROL_ART_PROGRESS)] protected GUIProgressControl GUIelement_ProgTrack; + [SkinControl((int)GUI_LRC_Controls.CONTROL_ART_ALBUMART)] + protected GUIImage GUIelement_ImgCoverArt; + [SkinControl((int)GUI_LRC_Controls.CONTROL_ART_PROGRESS)] + protected GUIProgressControl GUIelement_ProgTrack; private int _SearchType; @@ -131,7 +133,7 @@ #region Fields releated to the editor mode internal const int _TAG_IN_ROUND = 13; - internal int _currentLRCLineIndex; + internal int nextLRCLineIndex; private string[] _lines; internal int _LRCLinesTotal; internal int _min; @@ -154,7 +156,7 @@ public override bool Init() { - _selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; + _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; _startingScrollSpeedVertical = GUIGraphicsContext.ScrollSpeedVertical; GUIGraphicsContext.ScrollSpeedVertical = 0; @@ -165,7 +167,7 @@ public override void Process() { - if ((_newTrack || _SearchingState != (int) SEARCH_STATE.NOT_SEARCHING) + if ((_newTrack || _SearchingState != (int)SEARCH_STATE.NOT_SEARCHING) && (!g_Player.IsRadio || !string.IsNullOrEmpty(_artist))) { if (_newTrack) @@ -180,7 +182,7 @@ MusicDatabase mDB = MusicDatabase.Instance; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); if (g_Player.IsRadio == false) { @@ -196,6 +198,7 @@ _title = _CurrentTrackTag.Title.Trim(); _title = _title.Replace("''", "'"); _title = LyricUtil.CapatalizeString(_title); + _title = LyricUtil.TrimForParenthesis(_title); GetAlbumArt(); GetAlbumArt(_artist); @@ -203,7 +206,9 @@ else { _StatusText = "No music file is playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + resetLrcFields(); + resetGUI(_selectedScreen); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } else @@ -223,26 +228,26 @@ _CurrentTrackTag.Lyrics = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LYRICS - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { // Get lyric if (_artist.Length != 0) { - if (_SearchingState == (int) SEARCH_STATE.NOT_SEARCHING) + if (_SearchingState == (int)SEARCH_STATE.NOT_SEARCHING) { - if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int) SEARCH_TYPES.ONLY_LRCS) + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int)SEARCH_TYPES.ONLY_LRCS) { bool lrcFoundInTagOrLyricDb = FindLrc(); if (lrcFoundInTagOrLyricDb) { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } else { - _SearchingState = (int) SEARCH_STATE.SEARCHING_FOR_LRC; + _SearchingState = (int)SEARCH_STATE.SEARCHING_FOR_LRC; } } else @@ -250,32 +255,32 @@ bool lyricFoundInTagOrLyricDb = FindLyric(); if (lyricFoundInTagOrLyricDb) { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } else { - _SearchingState = (int) SEARCH_STATE.SEARCHING_FOR_LYRIC; + _SearchingState = (int)SEARCH_STATE.SEARCHING_FOR_LYRIC; } } } - else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LRC && + else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LRC && !_LyriccontrollerIsWorking) { - if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) { FindLyric(); - _SearchingState = (int) SEARCH_STATE.SEARCHING_FOR_LYRIC; + _SearchingState = (int)SEARCH_STATE.SEARCHING_FOR_LYRIC; } else { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } } - else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LYRIC && + else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LYRIC && !_LyriccontrollerIsWorking) { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } } else @@ -286,14 +291,16 @@ _LyricText = ""; _StatusText = "No music file playing"; + resetLrcFields(); + resetGUI(_selectedScreen); - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } - else if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + else if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { _newTrack = false; - _currentLRCLineIndex = 0; + nextLRCLineIndex = 0; _LRCLinesTotal = 0; _tagRoundFinished = 0; @@ -332,7 +339,7 @@ _LyricText = ""; _StatusText = "No music file playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } @@ -342,8 +349,8 @@ if (_lyricsFound) { - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { CalculateNextInterval(); } @@ -366,28 +373,28 @@ if (lrc.IsValid) { _alreadyValidLRC = true; - _lines = new string[1] {"This song already has a valid LRC lyric."}; + _lines = new string[1] { "This song already has a valid LRC lyric." }; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, _lines[0]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, _lines[0]); } else { - _lines = _LyricText.Split(new string[2] {"\r\n", "\n"}, StringSplitOptions.None); + _lines = _LyricText.Split(new string[2] { "\r\n", "\n" }, StringSplitOptions.None); try { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; - i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; + for (int i = _tagRoundFinished * _TAG_IN_ROUND; + i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); } } catch @@ -397,20 +404,23 @@ } else { + resetGUI(_selectedScreen); _StatusText = "No music file is playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } private void LoadSettings() { _newTrack = true; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; _LyricsToWriteToTag = new List<string[]>(); resetGUI(_selectedScreen); + + using (Settings xmlreader = new Settings("MediaPortal.xml")) { _UseID3 = xmlreader.GetValueAsBool("musicfiles", "showid3", true); @@ -463,7 +473,7 @@ string translationString = (xmlreader.GetValueAsString("myLyrics", "translationLanguage", "English (en)")); - string[] strings = translationString.Split(new string[1] {"("}, StringSplitOptions.None); + string[] strings = translationString.Split(new string[1] { "(" }, StringSplitOptions.None); _translationLanguage = strings[0].Trim(); _translationLanguageCode = strings[1].Replace(")", string.Empty); @@ -479,15 +489,15 @@ if (_useAutoScrollAsDefault) { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } else { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); } if (string.IsNullOrEmpty(_guidString)) @@ -542,7 +552,7 @@ sitesToSearch.Add("LyricsPluginSite"); } - _LyricSitesTosearch = (string[]) sitesToSearch.ToArray(typeof (string)); + _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); // Deserialize lyrics and marked database, and save references in LyricsDB try @@ -550,17 +560,17 @@ string path = Config.GetFile(Config.Dir.Database, MLyricsDbName); FileStream fs = new FileStream(path, FileMode.Open); BinaryFormatter bf = new BinaryFormatter(); - LyricsDb = (LyricsDatabase) bf.Deserialize(fs); + LyricsDb = (LyricsDatabase)bf.Deserialize(fs); fs.Close(); path = Config.GetFile(Config.Dir.Database, MLyricsMarkedDbName); fs = new FileStream(path, FileMode.Open); - LyricsMarkedDb = (LyricsDatabase) bf.Deserialize(fs); + LyricsMarkedDb = (LyricsDatabase)bf.Deserialize(fs); fs.Close(); } catch { - GUIDialogOK dlg = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg.SetHeading("No lyric database found"); dlg.SetLine(1, "Please run the MyLyrics configuration"); dlg.SetLine(2, "before running the plugin."); @@ -574,6 +584,8 @@ { LoadSettings(); + GUIPropertyManager.OnPropertyChanged += trackChangeHandler; + //_OkToCallPreviousMenu = false; base.OnPageLoad(); @@ -581,7 +593,7 @@ if (_ImageChangeTimer == null) { _ImageChangeTimer = new Timer(); - _ImageChangeTimer.Interval = 15*1000; + _ImageChangeTimer.Interval = 15 * 1000; _ImageChangeTimer.Elapsed += OnImageTimerTickEvent; _ImageChangeTimer.Start(); } @@ -599,7 +611,7 @@ { StopThread(); resetAll(); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); GUIGraphicsContext.ScrollSpeedVertical = _startingScrollSpeedVertical; @@ -662,14 +674,14 @@ } _lyricsFound = false; - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int) MyLyricsSettings.Screen.LRC_EDITOR); + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); } else { // parameter could be anything but LRC_EDITOR. Will find correct type when running findLyric(). - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); } _newTrack = true; @@ -692,27 +704,27 @@ } else if (action.m_key.KeyChar.Equals(102)) // 'F' { - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_PICK - && _selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_PICK + && _selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS) + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS) { - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC) { - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; } else { - _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; } } - else if (_SearchType == (int) SEARCH_TYPES.ONLY_LRCS) + else if (_SearchType == (int)SEARCH_TYPES.ONLY_LRCS) { - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; } else { - _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; } _newTrack = true; @@ -730,7 +742,7 @@ if (noOfRows <= _LrcTable.Rows.Count) { string status = string.Format("LRC {0} of {1} shown", noOfRows, _LrcTable.Rows.Count); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); _LyricText = _LrcTable.Rows[index]["Lyrics"] as string; _SimpleLrc = new SimpleLRC(null, null, _LyricText); @@ -743,6 +755,7 @@ } else if (action.m_key.KeyChar.Equals(98)) // 'B' (stop playing media) { + resetLrcFields(); resetGUI(_selectedScreen); } break; @@ -769,7 +782,7 @@ private void ShowLrcPick() { - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_PICK) { LrcFinder lrcFinder = new LrcFinder(); _LrcTable = lrcFinder.FindLRCs(_artist, _title); @@ -792,21 +805,21 @@ status = string.Format("LRC {0} of {1} shown", "1", _LrcTable.Rows.Count); } - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else if (_LrcTable == null) { - resetGUI((int) MyLyricsSettings.Screen.LRC_PICK); + resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); string status = "LrcFinder could not be reached..."; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else { //resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); string status = "No LRC found..."; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); //string lyricInfo = "Press the 'P' key to return"; //GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, lyricInfo); @@ -823,7 +836,7 @@ _LrcTable = null; _newTrack = true; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; Process(); } @@ -832,7 +845,7 @@ protected override void OnShowContextMenu() { - GUIDialogMenu dlg = (GUIDialogMenu) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_MENU); + GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; @@ -847,7 +860,7 @@ string translateLabelString = "Translate to " + _translationLanguage.ToLower(); dlg.Add(translateLabelString); - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { dlg.Add("Use picked LRC"); } @@ -856,7 +869,7 @@ dlg.Add("Pick LRC"); } - if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) { dlg.Add("Show scrolling lyric"); } @@ -874,18 +887,18 @@ switch (dlg.SelectedLabelText) { case "Find LRC": - _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; - _selectedScreen = (int) MyLyricsSettings.Screen.LRC; + _selectedScreen = (int)MyLyricsSettings.Screen.LRC; resetGUI(_selectedScreen); _newTrack = true; break; case "Find lyric": - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; - _selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; + _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; resetGUI(_selectedScreen); _newTrack = true; @@ -895,7 +908,7 @@ // Don't use a stream to create a LRC if (g_Player.IsRadio) { - GUIDialogOK dlg2 = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg2.SetHeading("LRC editor error"); dlg2.SetLine(1, "You cannot tag a streaming"); dlg2.SetLine(2, "media due to inproper timestamps."); @@ -904,13 +917,13 @@ return; } - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; //_lyricsFound = false; - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int) MyLyricsSettings.Screen.LRC_EDITOR); + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); } //_newTrack = true; @@ -929,24 +942,24 @@ case "Show scrolling lyric": case "Show static lyric": - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; - _selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; + _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; resetGUI(_selectedScreen); _newTrack = true; - if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; - GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; + GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } else { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } break; @@ -957,7 +970,7 @@ TranslateProvider.TranslateProvider translate = null; _StatusText = string.Empty; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); string lyricToTranslate = string.Empty; @@ -977,7 +990,7 @@ } catch (FileNotFoundException ex) { - GUIDialogOK dlg3 = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg3 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg3.SetHeading("File not found"); dlg3.SetLine(1, "The TranslateProvider.dll assembly"); dlg3.SetLine(2, "could not be found."); @@ -994,9 +1007,9 @@ translation = MediaPortalUtil.MakePlainLyricPerfectToShow(translation); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, translation); - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_TITLE, + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, string.Format("{0} translation", _translationLanguage)); GUIControl.FocusControl(GetID, CONTROL_LYRIC_SELECTED); @@ -1007,6 +1020,9 @@ //event driven handler to detect track change private void trackChangeHandler(string tag2, string value) { + if (tag2.Contains("#percentage") || tag2.Contains("#currentplaytime") || tag2.Contains("#currentremaining")) + return; + if (tag2.Equals("#Play.Current.Track")) // track has changed { if (value.Length != 0) // additional check @@ -1016,8 +1032,8 @@ StopThread(); resetAll(); _newTrack = true; - _SearchType = (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; Process(); } else @@ -1030,7 +1046,7 @@ resetGUI(_selectedScreen); _StatusText = "No music file playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } else if (g_Player.IsRadio) @@ -1042,7 +1058,7 @@ || string.IsNullOrEmpty(GUIPropertyManager.GetProperty("#Play.Current.Title"))) { _StatusText = "Stream info not complete"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } else if (!g_Player.CurrentFile.Equals(_LastStreamFile) || !newArtist.Equals(_artist) || !newTitle.Equals(_title)) @@ -1051,8 +1067,8 @@ StopThread(); resetAll(); - _SearchType = (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; _LastStreamFile = g_Player.CurrentFile; @@ -1087,7 +1103,7 @@ } /// <summary> - /// findLyric searches for a lyric related to the given tag. + /// FindLrc searches for a lyric related to the given tag. /// </summary> private bool FindLrc() { @@ -1096,7 +1112,7 @@ GUIControl.ClearControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, ""); - resetGUI((int) MyLyricsSettings.Screen.LRC); + resetGUI((int)MyLyricsSettings.Screen.LRC); if ((_CurrentTrackTag != null && _CurrentTrackTag.Artist != "") || g_Player.IsRadio) { @@ -1118,10 +1134,10 @@ 6) Search for lyric */ // (1 of 2) Search LRCS - if (_SearchType != (int) SEARCH_TYPES.ONLY_LYRICS) + if (_SearchType != (int)SEARCH_TYPES.ONLY_LYRICS) { _StatusText = "Searching for a matching LRC..."; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); #region 1) LRC in music tag @@ -1168,7 +1184,7 @@ { _lyricsFound = false; - _lc = new LyricsController(this, _EventStopThread, new string[1] {"LrcFinder"}, false, false, + _lc = new LyricsController(this, _EventStopThread, new string[1] { "LrcFinder" }, false, false, _Find, _Replace); // create worker thread instance @@ -1186,7 +1202,7 @@ else { _StatusText = "No matching LRC found"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } #endregion @@ -1222,14 +1238,14 @@ lyricText = LyricsDb[DatabaseUtil.CorrectKeyFormat(_artist, _title)].Lyrics; } - if (_SearchType != (int) SEARCH_TYPES.ONLY_LRCS) + if (_SearchType != (int)SEARCH_TYPES.ONLY_LRCS) { #region 4) Lyric in music tag if (_AutomaticReadFromMusicTag && g_Player.IsRadio == false && _CurrentTrackTag != null && _CurrentTrackTag.Lyrics.Length != 0 && - !((_SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) && + !((_SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) && new SimpleLRC(_artist, _title, _CurrentTrackTag.Lyrics).IsValid)) { string lyric = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); @@ -1244,22 +1260,22 @@ #region 5) Lyric in music database if (lyricText.Length != 0 && - !((_SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) && _CurrentTrackTag != null && + !((_SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) && _CurrentTrackTag != null && new SimpleLRC(_artist, _title, _CurrentTrackTag.Lyrics).IsValid)) { - LyricFound = new Object[] {lyricText, _artist, _title, "lyrics database"}; + LyricFound = new Object[] { lyricText, _artist, _title, "lyrics database" }; return true; } - #endregion + #endregion - #region 6) Search the Internet for a lyric + #region 6) Search the Internet for a lyric else if (_LyricSitesTosearch.Length > 0) { _StatusText = "Searching for a matching lyric..."; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); _lyricsFound = false; @@ -1293,9 +1309,11 @@ } else { + resetGUI(_selectedScreen); + resetLrcFields(); _TrackText = ""; _StatusText = "No music file playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); return false; } } @@ -1317,33 +1335,33 @@ if (showLrcPickScreen) { - resetGUI((int) MyLyricsSettings.Screen.LRC_PICK); + resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); } else { - resetGUI((int) MyLyricsSettings.Screen.LRC); + resetGUI((int)MyLyricsSettings.Screen.LRC); } _StatusText = ""; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); _LyricText = lyricText; try { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; i++) + for (int i = _tagRoundFinished * _TAG_IN_ROUND; i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { - ShowLrcLine((int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i, _lines[i]); - ShowLrcLine((int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, _lines[i]); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, _lines[i]); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, _lines[i]); } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; i++) + for (int i = _tagRoundFinished * _TAG_IN_ROUND; i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { SimpleLRCTimeAndLine currentLine = _LrcTimeCollection[i]; - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, currentLine.TimeString); } } @@ -1355,7 +1373,7 @@ private void TagLine() { - if (_alreadyValidLRC == false && _selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_alreadyValidLRC == false && _selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { if (_Stopwatch == null) return; @@ -1368,38 +1386,38 @@ ? _Stopwatch.ElapsedMilliseconds.ToString().Substring(0, 2) : _Stopwatch.ElapsedMilliseconds + "0") + "]"; _lines[_LRCLinesTotal] = time + _lines[_LRCLinesTotal]; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + _currentLRCLineIndex, + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, time); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + _currentLRCLineIndex); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + _currentLRCLineIndex); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); } if (++_LRCLinesTotal < _lines.Length) { // If a new round has to start - if (++_currentLRCLineIndex == _TAG_IN_ROUND) + if (++nextLRCLineIndex == _TAG_IN_ROUND) { - _currentLRCLineIndex = 0; + nextLRCLineIndex = 0; ++_tagRoundFinished; for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); } try { for (int i = 0; i < _TAG_IN_ROUND && _LRCLinesTotal + i < _lines.Length; i++) { - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); } } @@ -1449,7 +1467,7 @@ SaveLyricToTagLists(_CurrentTrackTag.FileName, _LyricText); } - _selectedScreen = (int) MyLyricsSettings.Screen.LRC; + _selectedScreen = (int)MyLyricsSettings.Screen.LRC; ShowLyricOnScreen(_LyricText, "MediaPortal"); // Upload LRC to LrcFinder if user has accepted in configuration @@ -1460,7 +1478,7 @@ else if (!_confirmedNoUploadLrcToLrcFinder) { GUIDialogYesNo dlgYesNo = - (GUIDialogYesNo) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_YES_NO); + (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO); if (dlgYesNo != null) { dlgYesNo.SetHeading("Upload to LRCFinder?"); @@ -1505,12 +1523,12 @@ if (lrcUploaded) { string status = "Your LRC was successfully uploaded"; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else { string status = "LrcFinder could not be reached..."; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } } @@ -1527,23 +1545,23 @@ string lastTimeStampTemp = _lines[_LRCLinesTotal].Substring(0, 9); _lines[_LRCLinesTotal] = _lines[_LRCLinesTotal].Substring(9); - if (--_currentLRCLineIndex < 0) + if (--nextLRCLineIndex < 0) { - _currentLRCLineIndex = _TAG_IN_ROUND - 1; + nextLRCLineIndex = _TAG_IN_ROUND - 1; --_tagRoundFinished; try { for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(0, 9)); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(9)); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(9)); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(0, 9)); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(9)); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(9)); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); } } catch @@ -1551,16 +1569,16 @@ ; } - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + _currentLRCLineIndex); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + _currentLRCLineIndex); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + _currentLRCLineIndex, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, "[xx:xx.xx]"); } else { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + _currentLRCLineIndex); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + _currentLRCLineIndex); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + _currentLRCLineIndex, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, "[xx:xx.xx]"); } } @@ -1570,15 +1588,15 @@ { if (_LrcTimeCollection != null) { - int trackTime = (int) (g_Player.CurrentPosition*1000); - _currentLRCLineIndex = _LrcTimeCollection.GetSimpleLRCTimeAndLineIndex(trackTime); + int trackTime = (int)(g_Player.CurrentPosition * 1000); + nextLRCLineIndex = _LrcTimeCollection.GetSimpleLRCTimeAndLineIndex(trackTime); - SimpleLRCTimeAndLine currentLine = _LrcTimeCollection[_currentLRCLineIndex]; + SimpleLRCTimeAndLine currentLine = _LrcTimeCollection[nextLRCLineIndex]; - _tagRoundFinished = _currentLRCLineIndex/_TAG_IN_ROUND; - int localIndex = (_currentLRCLineIndex%_TAG_IN_ROUND); + _tagRoundFinished = nextLRCLineIndex / _TAG_IN_ROUND; + int localIndex = (nextLRCLineIndex % _TAG_IN_ROUND); - if (_currentLRCLineIndex == _LrcTimeCollection.Count - 1) + if (nextLRCLineIndex == _LrcTimeCollection.Count - 1) { if (currentLine.Time - trackTime < 500) { @@ -1586,29 +1604,74 @@ } } + #region Show LRC lines in LRC mini labels + + int currentLRCLineIndex = nextLRCLineIndex > 0 ? nextLRCLineIndex - 1 : 0; + + if (_LrcTimeCollection[nextLRCLineIndex].Time < trackTime) + { + ++currentLRCLineIndex; + } + + + // 1. The two previous lines + if (currentLRCLineIndex >= 2) + { + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 0, _lines[currentLRCLineIndex - 2]); + } + if (currentLRCLineIndex >= 1) + { + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 1, _lines[currentLRCLineIndex - 1]); + } + + // 2. The current line + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 2, _lines[currentLRCLineIndex + 0]); + + // 3. The two future lines + // If last, then show empty lines for fourth and fifth label (showing the future LRC lines) + if (currentLRCLineIndex + 1 == _LrcTimeCollection.Count) + { + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 3, string.Empty); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 4, string.Empty); + } + // If second last then clear the last label (only one future LRC lines left) + else if (currentLRCLineIndex + 2 == _LrcTimeCollection.Count) + { + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 3, _lines[currentLRCLineIndex + 1]); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 4, string.Empty); + } + else + { + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 3, _lines[currentLRCLineIndex + 1]); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + 4, _lines[currentLRCLineIndex + 2]); + } + + #endregion + + if (_tagRoundFinished > 0 && localIndex == 0) { for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } } else { for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { for (int i = 0; i < _TAG_IN_ROUND; i++) { SimpleLRCTimeAndLine currentLineTime = - _LrcTimeCollection[_tagRoundFinished*_TAG_IN_ROUND + i]; - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + _LrcTimeCollection[_tagRoundFinished * _TAG_IN_ROUND + i]; + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, (currentLineTime != null ? currentLineTime.TimeString : string.Empty)); @@ -1619,11 +1682,11 @@ { for (int i = 0; i < _TAG_IN_ROUND; i++) { - ShowLrcLine((int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); - ShowLrcLine((int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + ShowLrcLine((int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); } } catch @@ -1635,7 +1698,7 @@ // Highlight the lines that have been passed in the current interval for (int i = 0; i < localIndex; i++) { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } } } @@ ... [truncated message content] |
From: <Sil...@us...> - 2010-03-01 20:07:24
|
Revision: 3475 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3475&view=rev Author: SilentException Date: 2010-03-01 20:06:50 +0000 (Mon, 01 Mar 2010) Log Message: ----------- * added new setting: alwaysAskUploadToLrcFinder - it'll always ask for uploading newly created LRC to LrcFinder * improved thread killing * some events on LRC pick status are automatically cleared on timer after 3 seconds * hiding/showing controls order so that for example done text doesn't show over not done * hiding image on stop playback * improved browsing through all the screens * long operations called from threads are now in background workers for nice cancellation * improved reading lyrics from tag * proper message when there is no enough data for search * proper messages in lrc editor when no music file is playing and when there is no valid lyrics * scrolling or static lyrics type will be remembered until mp restart (it'll not be reset on each page load) * implemented left - right actions on lyric picker * action key 13 now implemented on ACTION_SELECT_ITEM as selecting item on context menu also triggered action_key_pressed * implemented action key '0' to show lrc editor * implemented action key '*' to tag line in lrc editor * implemented action key '#' to untag last line in lrc editor * fixed vertical scroll speed 6 (mp error, check comments) * restricted access to some screens in certain conditions * in lrc picker, current showing LRC is compared to those returned and automatically selected to check * action key 42, used so far for lyric editor, by ascii tables translates to '(' ? maybe remove that.. Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.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.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2010-03-01 16:20:24 UTC (rev 3474) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2010-03-01 20:06:50 UTC (rev 3475) @@ -55,7 +55,7 @@ sitesArrayList.Add(site); } } - lyricsSites = (string[]) sitesArrayList.ToArray(typeof (string)); + lyricsSites = (string[])sitesArrayList.ToArray(typeof(string)); LyricSearch.LyricsSites = lyricsSites; @@ -107,24 +107,22 @@ // clean-up operations may be placed here for (int i = 0; i < threadList.Count; i++) { - ((Thread) threadList[i]).Abort(); + ((Thread)threadList[i]).Abort(); } - bool stillThreadsAlive = true; + m_StopSearches = true; + + bool stillThreadsAlive = threadList.Count > 0; while (stillThreadsAlive) { + stillThreadsAlive = false; for (int i = 0; i < threadList.Count; i++) { - stillThreadsAlive = false; - if (((Thread) threadList[i]).IsAlive) + if (((Thread)threadList[i]).IsAlive) stillThreadsAlive = true; } + } - if (threadList.Count == 0) - { - stillThreadsAlive = false; - } - } FinishThread("", "", "The search has ended.", ""); } @@ -143,19 +141,21 @@ // clean-up operations may be placed here for (int i = 0; i < threadList.Count; i++) { - ((Thread) threadList[i]).Abort(); + ((Thread)threadList[i]).Abort(); } - bool stillThreadsAlive = (threadList.Count > 0 ? true : false); + m_StopSearches = true; + + bool stillThreadsAlive = threadList.Count > 0; while (stillThreadsAlive) { + stillThreadsAlive = false; for (int i = 0; i < threadList.Count; i++) { - stillThreadsAlive = false; - ; - if (((Thread) threadList[i]).IsAlive) + if (((Thread)threadList[i]).IsAlive) stillThreadsAlive = true; } + } m_EventStopped_LyricController.Set(); @@ -172,13 +172,13 @@ // create worker thread instance ThreadStart threadInstance = delegate - { - LyricSearch lyricSearch = new LyricSearch(this, artist, title, - strippedArtistName, - m_allowAllToComplete, - m_automaticUpdate); - lyricSearch.Run(); - }; + { + LyricSearch lyricSearch = new LyricSearch(this, artist, title, + strippedArtistName, + m_allowAllToComplete, + m_automaticUpdate); + lyricSearch.Run(); + }; Thread lyricSearchThread = new Thread(threadInstance); lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window @@ -195,7 +195,7 @@ internal void UpdateString(String message, String site) { - m_Form.UpdateString = new Object[] {message, site}; + m_Form.UpdateString = new Object[] { message, site }; } internal void StatusUpdate(string artist, string title, string site, bool lyricFound) @@ -228,7 +228,7 @@ if (m_allowAllToComplete || m_StopSearches == false) { - m_Form.LyricFound = new Object[] {cleanLyric, artist, title, site}; + m_Form.LyricFound = new Object[] { cleanLyric, artist, title, site }; StatusUpdate(artist, title, site, true); } } @@ -239,7 +239,7 @@ if (m_allowAllToComplete || m_StopSearches == false) { - m_Form.LyricNotFound = new Object[] {artist, title, message, site}; + m_Form.LyricNotFound = new Object[] { artist, title, message, site }; StatusUpdate(artist, title, site, false); } } @@ -253,7 +253,7 @@ { Thread.Sleep(50); } - m_Form.ThreadFinished = new Object[] {artist, title, message, site}; + m_Form.ThreadFinished = new Object[] { artist, title, message, site }; } internal void ThreadException(String s) Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-03-01 16:20:24 UTC (rev 3474) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-03-01 20:06:50 UTC (rev 3475) @@ -78,6 +78,7 @@ this.comboBoxLanguages = new System.Windows.Forms.ComboBox(); this.mpLabel1 = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbLrc = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbAlwaysAskForUploadToLrcFinder = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tbLrcTaggingName = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbLrcTaggingName = new MediaPortal.UserInterface.Controls.MPLabel(); this.tbLrcTaggingOffset = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -157,7 +158,7 @@ this.tabControl.Location = new System.Drawing.Point(0, 0); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(558, 536); + this.tabControl.Size = new System.Drawing.Size(558, 539); this.tabControl.TabIndex = 1; this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); // @@ -166,7 +167,7 @@ this.tabPageLyricsDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageLyricsDatabase.Name = "tabPageLyricsDatabase"; this.tabPageLyricsDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLyricsDatabase.Size = new System.Drawing.Size(550, 510); + this.tabPageLyricsDatabase.Size = new System.Drawing.Size(550, 513); this.tabPageLyricsDatabase.TabIndex = 1; this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; @@ -176,7 +177,7 @@ this.tabPageMusicDatabaseBrowse.Location = new System.Drawing.Point(4, 22); this.tabPageMusicDatabaseBrowse.Name = "tabPageMusicDatabaseBrowse"; this.tabPageMusicDatabaseBrowse.Padding = new System.Windows.Forms.Padding(3); - this.tabPageMusicDatabaseBrowse.Size = new System.Drawing.Size(550, 510); + this.tabPageMusicDatabaseBrowse.Size = new System.Drawing.Size(550, 513); this.tabPageMusicDatabaseBrowse.TabIndex = 3; this.tabPageMusicDatabaseBrowse.Text = "Music database browse"; this.tabPageMusicDatabaseBrowse.UseVisualStyleBackColor = true; @@ -191,7 +192,7 @@ this.tabPageDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageDatabase.Name = "tabPageDatabase"; this.tabPageDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageDatabase.Size = new System.Drawing.Size(550, 510); + this.tabPageDatabase.Size = new System.Drawing.Size(550, 513); this.tabPageDatabase.TabIndex = 2; this.tabPageDatabase.Text = "Music database batch search"; this.tabPageDatabase.UseVisualStyleBackColor = true; @@ -624,7 +625,7 @@ this.tabPageSetup.Location = new System.Drawing.Point(4, 22); this.tabPageSetup.Name = "tabPageSetup"; this.tabPageSetup.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSetup.Size = new System.Drawing.Size(550, 510); + this.tabPageSetup.Size = new System.Drawing.Size(550, 513); this.tabPageSetup.TabIndex = 2; this.tabPageSetup.Text = "Settings"; this.tabPageSetup.UseVisualStyleBackColor = true; @@ -662,6 +663,7 @@ // // gbLrc // + this.gbLrc.Controls.Add(this.cbAlwaysAskForUploadToLrcFinder); this.gbLrc.Controls.Add(this.tbLrcTaggingName); this.gbLrc.Controls.Add(this.lbLrcTaggingName); this.gbLrc.Controls.Add(this.tbLrcTaggingOffset); @@ -675,6 +677,17 @@ this.gbLrc.TabStop = false; this.gbLrc.Text = "LRC settings"; // + // cbAlwaysAskForUploadToLrcFinder + // + this.cbAlwaysAskForUploadToLrcFinder.AutoSize = true; + this.cbAlwaysAskForUploadToLrcFinder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbAlwaysAskForUploadToLrcFinder.Location = new System.Drawing.Point(327, 20); + this.cbAlwaysAskForUploadToLrcFinder.Name = "cbAlwaysAskForUploadToLrcFinder"; + this.cbAlwaysAskForUploadToLrcFinder.Size = new System.Drawing.Size(186, 17); + this.cbAlwaysAskForUploadToLrcFinder.TabIndex = 19; + this.cbAlwaysAskForUploadToLrcFinder.Text = "Always ask for upload to LrcFinder"; + this.cbAlwaysAskForUploadToLrcFinder.UseVisualStyleBackColor = true; + // // tbLrcTaggingName // this.tbLrcTaggingName.BorderColor = System.Drawing.Color.Empty; @@ -1072,7 +1085,7 @@ this.trackBar.Location = new System.Drawing.Point(35, 37); this.trackBar.Maximum = 3; this.trackBar.Name = "trackBar"; - this.trackBar.Size = new System.Drawing.Size(158, 45); + this.trackBar.Size = new System.Drawing.Size(158, 42); this.trackBar.TabIndex = 25; this.trackBar.TickStyle = System.Windows.Forms.TickStyle.Both; this.trackBar.Value = 2; @@ -1121,7 +1134,7 @@ this.tabPageReplace.Location = new System.Drawing.Point(4, 22); this.tabPageReplace.Name = "tabPageReplace"; this.tabPageReplace.Padding = new System.Windows.Forms.Padding(3); - this.tabPageReplace.Size = new System.Drawing.Size(550, 510); + this.tabPageReplace.Size = new System.Drawing.Size(550, 513); this.tabPageReplace.TabIndex = 5; this.tabPageReplace.Text = "Find & Replace"; this.tabPageReplace.UseVisualStyleBackColor = true; @@ -1174,7 +1187,7 @@ this.tabPageAbout.Location = new System.Drawing.Point(4, 22); this.tabPageAbout.Name = "tabPageAbout"; this.tabPageAbout.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAbout.Size = new System.Drawing.Size(550, 510); + this.tabPageAbout.Size = new System.Drawing.Size(550, 513); this.tabPageAbout.TabIndex = 4; this.tabPageAbout.Text = "About"; this.tabPageAbout.UseVisualStyleBackColor = true; @@ -1201,7 +1214,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(558, 536); + this.ClientSize = new System.Drawing.Size(558, 539); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); @@ -1347,5 +1360,6 @@ private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox5; private MediaPortal.UserInterface.Controls.MPLabel mpLabel1; private System.Windows.Forms.ComboBox comboBoxLanguages; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbAlwaysAskForUploadToLrcFinder; } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-03-01 16:20:24 UTC (rev 3474) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-03-01 20:06:50 UTC (rev 3475) @@ -260,6 +260,9 @@ cbUploadLrcAutomatically.Checked = xmlreader.GetValue("myLyrics", "uploadLrcToLrcFinder").Equals("yes"); + cbAlwaysAskForUploadToLrcFinder.Checked = + xmlreader.GetValue("myLyrics", "alwaysAskUploadLrcToLrcFinder").Equals("yes"); + lbSongsLimitNote.Text = ("(You have currently " + m_TotalTitles.ToString() + " titles in your music database)"); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-01 16:20:24 UTC (rev 3474) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-01 20:06:50 UTC (rev 3475) @@ -18,6 +18,7 @@ using MediaPortal.Playlists; using MediaPortal.Profile; using MediaPortal.TagReader; +using System.ComponentModel; using Timer = System.Timers.Timer; namespace MyLyrics @@ -102,10 +103,17 @@ private bool _useLyricWiki; private bool _ValidLrcLyric; - // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) + // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) private Timer _WriteTagTimer; + private int _selectedinLRCPicker = 0; + private Timer _LRCPickTimer; + private string _lastLRCPickLabel = ""; + private bool _isInTranslation = false; + private BackgroundWorker worker = new BackgroundWorker(); + private bool _settingsRead = false; + #endregion [SkinControl((int)GUI_LRC_Controls.CONTROL_ART_ALBUMART)] @@ -127,6 +135,7 @@ internal bool _uploadLrcToLrcFinder; internal bool _useAutoOnLyricLength; internal bool _useAutoScrollAsDefault; + internal bool _alwaysAskUploadLrcToLrcFinder; #endregion @@ -156,19 +165,22 @@ public override bool Init() { - _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; + _selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; _startingScrollSpeedVertical = GUIGraphicsContext.ScrollSpeedVertical; GUIGraphicsContext.ScrollSpeedVertical = 0; + worker.DoWork += SaveLyricToTagLists; + return Load(GUIGraphicsContext.Skin + @"\" + _lyricsScreenXML); } public override void Process() { - if ((_newTrack || _SearchingState != (int)SEARCH_STATE.NOT_SEARCHING) + if ((_newTrack || _SearchingState != (int) SEARCH_STATE.NOT_SEARCHING) && (!g_Player.IsRadio || !string.IsNullOrEmpty(_artist))) + //&& (!g_Player.IsRadio || _CurrentTrackTag!=null)) { if (_newTrack) { @@ -182,10 +194,17 @@ MusicDatabase mDB = MusicDatabase.Instance; - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); if (g_Player.IsRadio == false) { + string currentFile = null; + string currentLyrics = null; + if (_CurrentTrackTag != null) + { + currentFile = _CurrentTrackTag.FileName; + currentLyrics = _CurrentTrackTag.Lyrics; + } _CurrentTrackTag = mDB.GetTag(g_Player.CurrentFile); if (_CurrentTrackTag != null) @@ -198,17 +217,33 @@ _title = _CurrentTrackTag.Title.Trim(); _title = _title.Replace("''", "'"); _title = LyricUtil.CapatalizeString(_title); - _title = LyricUtil.TrimForParenthesis(_title); + _title = LyricUtil.TrimForParenthesis(_title); GetAlbumArt(); GetAlbumArt(_artist); + + if (currentLyrics != null && currentFile != null && _CurrentTrackTag.FileName == currentFile) + { + if (_CurrentTrackTag.Lyrics != currentLyrics) + { + _CurrentTrackTag.Lyrics = currentLyrics; + } + } } else { - _StatusText = "No music file is playing"; + _artist = ""; + _title = ""; + _TrackText = ""; + _LyricText = ""; + _ImagePathContainer.Clear(); + GUIelement_ImgCoverArt.FreeResources(); + resetLrcFields(); resetGUI(_selectedScreen); - GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); + + _StatusText = "No music file is playing"; + GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } else @@ -228,22 +263,22 @@ _CurrentTrackTag.Lyrics = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); } - if (_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS - || _selectedScreen == (int)MyLyricsSettings.Screen.LRC - || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int) MyLyricsSettings.Screen.LYRICS + || _selectedScreen == (int) MyLyricsSettings.Screen.LRC + || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) { // Get lyric - if (_artist.Length != 0) + if (_artist.Length != 0 && _title.Length != 0) { - if (_SearchingState == (int)SEARCH_STATE.NOT_SEARCHING) + if (_SearchingState == (int) SEARCH_STATE.NOT_SEARCHING) { - if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int)SEARCH_TYPES.ONLY_LRCS) + if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int) SEARCH_TYPES.ONLY_LRCS) { bool lrcFoundInTagOrLyricDb = FindLrc(); if (lrcFoundInTagOrLyricDb) { - _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; } else { @@ -263,41 +298,55 @@ } } } - else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LRC && + else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LRC && !_LyriccontrollerIsWorking) { - if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) + if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) { FindLyric(); - _SearchingState = (int)SEARCH_STATE.SEARCHING_FOR_LYRIC; + _SearchingState = (int) SEARCH_STATE.SEARCHING_FOR_LYRIC; } else { - _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; } } - else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LYRIC && + else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LYRIC && !_LyriccontrollerIsWorking) { - _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; } } + else if ((_artist.Length==0 && _title.Length>0) || (_title.Length==0 && _artist.Length>0)) + { + _ImagePathContainer.Clear(); + GUIelement_ImgCoverArt.FreeResources(); + + resetLrcFields(); + resetGUI(_selectedScreen); + + _StatusText = "Not enough data for lyric search"; + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); + } else { _artist = ""; _title = ""; _TrackText = ""; _LyricText = ""; - _StatusText = "No music file playing"; + _ImagePathContainer.Clear(); + GUIelement_ImgCoverArt.FreeResources(); resetLrcFields(); resetGUI(_selectedScreen); + + _StatusText = "No music file is playing"; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } - else if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) + else if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) { _newTrack = false; nextLRCLineIndex = 0; @@ -333,14 +382,14 @@ _artist = ""; _title = ""; _TrackText = ""; + _LyricText = ""; + _ImagePathContainer.Clear(); + GUIelement_ImgCoverArt.FreeResources(); resetGUI(_selectedScreen); - _LyricText = ""; - _StatusText = "No music file playing"; - - GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, - _StatusText); + _StatusText = "No music file is playing"; + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } } @@ -349,8 +398,8 @@ if (_lyricsFound) { - if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC - || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC + || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) { CalculateNextInterval(); } @@ -364,6 +413,15 @@ private void ShowLRCtoEdit() { + if (_CurrentTrackTag == null) + { + resetGUI(_selectedScreen); + + _StatusText = "No music file is playing"; + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); + return; + } + if (!string.IsNullOrEmpty(_LyricText)) { _LyricText = _LyricText.Trim(); @@ -373,28 +431,30 @@ if (lrc.IsValid) { _alreadyValidLRC = true; - _lines = new string[1] { "This song already has a valid LRC lyric." }; + _lines = new string[1] {"This song already has a valid LRC lyric"}; - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, _lines[0]); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, _lines[0]); } else { - _lines = _LyricText.Split(new string[2] { "\r\n", "\n" }, StringSplitOptions.None); + resetLrcFields(); + _lines = _LyricText.Split(new string[2] {"\r\n", "\n"}, StringSplitOptions.None); + try { - for (int i = _tagRoundFinished * _TAG_IN_ROUND; - i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; + for (int i = _tagRoundFinished*_TAG_IN_ROUND; + i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; i++) { + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + //GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); } } catch @@ -404,23 +464,20 @@ } else { - resetGUI(_selectedScreen); - _StatusText = "No music file is playing"; - GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); + _StatusText = "No valid lyrics found"; + GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } private void LoadSettings() { _newTrack = true; - _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; _LyricsToWriteToTag = new List<string[]>(); resetGUI(_selectedScreen); - - using (Settings xmlreader = new Settings("MediaPortal.xml")) { _UseID3 = xmlreader.GetValueAsBool("musicfiles", "showid3", true); @@ -469,11 +526,15 @@ (xmlreader.GetValueAsString("myLyrics", "confirmedNoUploadLrcToLrcFinder", "False")).Equals("yes") ? true : false; + _alwaysAskUploadLrcToLrcFinder = + (xmlreader.GetValueAsString("myLyrics", "alwaysAskUploadLrcToLrcFinder", "False")).Equals("yes") + ? true + : false; string translationString = (xmlreader.GetValueAsString("myLyrics", "translationLanguage", "English (en)")); - string[] strings = translationString.Split(new string[1] { "(" }, StringSplitOptions.None); + string[] strings = translationString.Split(new string[1] {"("}, StringSplitOptions.None); _translationLanguage = strings[0].Trim(); _translationLanguageCode = strings[1].Replace(")", string.Empty); @@ -487,17 +548,20 @@ _Replace = xmlreader.GetValueAsString("myLyrics", "replace", ""); } - if (_useAutoScrollAsDefault) + if (!_settingsRead) // only first time { - CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; + if (_useAutoScrollAsDefault) + { + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); - } - else - { - CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + } + else + { + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + } } if (string.IsNullOrEmpty(_guidString)) @@ -552,25 +616,27 @@ sitesToSearch.Add("LyricsPluginSite"); } - _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); + _LyricSitesTosearch = (string[]) sitesToSearch.ToArray(typeof (string)); + _settingsRead = true; + // Deserialize lyrics and marked database, and save references in LyricsDB try { string path = Config.GetFile(Config.Dir.Database, MLyricsDbName); FileStream fs = new FileStream(path, FileMode.Open); BinaryFormatter bf = new BinaryFormatter(); - LyricsDb = (LyricsDatabase)bf.Deserialize(fs); + LyricsDb = (LyricsDatabase) bf.Deserialize(fs); fs.Close(); path = Config.GetFile(Config.Dir.Database, MLyricsMarkedDbName); fs = new FileStream(path, FileMode.Open); - LyricsMarkedDb = (LyricsDatabase)bf.Deserialize(fs); + LyricsMarkedDb = (LyricsDatabase) bf.Deserialize(fs); fs.Close(); } catch { - GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); dlg.SetHeading("No lyric database found"); dlg.SetLine(1, "Please run the MyLyrics configuration"); dlg.SetLine(2, "before running the plugin."); @@ -593,11 +659,19 @@ if (_ImageChangeTimer == null) { _ImageChangeTimer = new Timer(); - _ImageChangeTimer.Interval = 15 * 1000; + _ImageChangeTimer.Interval = 15*1000; _ImageChangeTimer.Elapsed += OnImageTimerTickEvent; _ImageChangeTimer.Start(); } + if (_LRCPickTimer == null) + { + _LRCPickTimer = new Timer(); + _LRCPickTimer.Interval = 3*1000; + _LRCPickTimer.Elapsed += OnLRCPickTimerTickEvent; + _LRCPickTimer.Stop(); + } + if (_enableLogging) { logFullFileName = Config.GetFile(Config.Dir.Log, logFileName); @@ -610,8 +684,10 @@ protected override void OnPageDestroy(int new_windowId) { StopThread(); + if (worker.IsBusy) + worker.CancelAsync(); resetAll(); - resetGUI((int)MyLyricsSettings.Screen.LYRICS); + resetGUI((int) MyLyricsSettings.Screen.LYRICS); GUIGraphicsContext.ScrollSpeedVertical = _startingScrollSpeedVertical; @@ -642,6 +718,20 @@ GUIPropertyManager.OnPropertyChanged -= trackChangeHandler; } + public override bool OnMessage(GUIMessage message) + { + // Check if the message was ment for this control. + if (( + message.Message == GUIMessage.MessageType.GUI_MSG_LABEL_SET || + message.Message == GUIMessage.MessageType.GUI_MSG_LABEL_RESET + ) && + message.TargetWindowId == GetID && + message.TargetControlId == (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS) + { + _LRCPickTimer.Stop(); + } + return base.OnMessage(message); + } public override void OnAction(Action action) { @@ -659,13 +749,49 @@ //return; break; } + case Action.ActionType.ACTION_MOVE_LEFT: + case Action.ActionType.ACTION_MOVE_RIGHT: + { + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) + { + if (action.wID == Action.ActionType.ACTION_MOVE_LEFT) + _selectedinLRCPicker--; + if (action.wID == Action.ActionType.ACTION_MOVE_RIGHT) + _selectedinLRCPicker++; + + if (_selectedinLRCPicker < 0) + _selectedinLRCPicker = _LrcTable.Rows.Count - 1; + if (_selectedinLRCPicker > _LrcTable.Rows.Count - 1) + _selectedinLRCPicker = 0; + + + string status = string.Format("LRC {0} of {1} shown", _selectedinLRCPicker + 1, _LrcTable.Rows.Count); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + + _LyricText = _LrcTable.Rows[_selectedinLRCPicker]["Lyrics"] as string; + _SimpleLrc = new SimpleLRC(null, null, _LyricText); + StartShowingLrc(_LyricText, true); + } + break; + } + case Action.ActionType.ACTION_SELECT_ITEM: + { + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK && !action.m_key.KeyChar.Equals(42)) + ShowLrcPick(); + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) + TagLine(); + break; + } case Action.ActionType.ACTION_KEY_PRESSED: { - if (action.m_key.KeyChar.Equals(13)) + if (/*action.m_key.KeyChar.Equals(13) || */action.m_key.KeyChar.Equals(42)) // 'Enter' or '*' { - TagLine(); + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK && !action.m_key.KeyChar.Equals(42)) + ShowLrcPick(); + if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + TagLine(); } - else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(101)) // 'E' + else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(48) ||action.m_key.KeyChar.Equals(101)) // '(' or '0' or 'E' - 42 is actually '(' ??? { // Don't use a stream to create a LRC if (g_Player.IsRadio) @@ -674,21 +800,45 @@ } _lyricsFound = false; - if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) { resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + ShowLRCtoEdit(); + Process(); } else { // parameter could be anything but LRC_EDITOR. Will find correct type when running findLyric(). - resetGUI((int)MyLyricsSettings.Screen.LYRICS); + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS || + _SearchType == (int)SEARCH_TYPES.ONLY_LRCS) + { + resetGUI((int)MyLyricsSettings.Screen.LRC); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS); + } + //resetGUI((int) MyLyricsSettings.Screen.LYRICS); + _newTrack = true; + Process(); } - - _newTrack = true; - Process(); } - else if (action.m_key.KeyChar.Equals(115)) + else if (action.m_key.KeyChar.Equals(115)) // 'S' { + if (GUIGraphicsContext.ScrollSpeedVertical >= 10) + GUIGraphicsContext.ScrollSpeedVertical = 0; + else if (GUIGraphicsContext.ScrollSpeedVertical >= 8) + GUIGraphicsContext.ScrollSpeedVertical = 10; + else if (GUIGraphicsContext.ScrollSpeedVertical >= 6) + GUIGraphicsContext.ScrollSpeedVertical = 8; + else if (GUIGraphicsContext.ScrollSpeedVertical >= 4) + GUIGraphicsContext.ScrollSpeedVertical = 7; // MediaPortal BUG here, scroll 6 gets many errors in log: + //GUITextScrollUpControl.cs: if (_frameLimiter % (6 - GUIGraphicsContext.ScrollSpeedVertical) == 0) + else if (GUIGraphicsContext.ScrollSpeedVertical >= 2) + GUIGraphicsContext.ScrollSpeedVertical = 4; + else if (GUIGraphicsContext.ScrollSpeedVertical >= 0) + GUIGraphicsContext.ScrollSpeedVertical = 2; + /* if (GUIGraphicsContext.ScrollSpeedVertical >= 10 || GUIGraphicsContext.ScrollSpeedVertical == 1 || GUIGraphicsContext.ScrollSpeedVertical == 3 @@ -701,12 +851,30 @@ ++GUIGraphicsContext.ScrollSpeedVertical; ++GUIGraphicsContext.ScrollSpeedVertical; } + */ } else if (action.m_key.KeyChar.Equals(102)) // 'F' { - if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_PICK - && _selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) + //if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_PICK + // && _selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + //{ + + string lyricText = String.Empty; + bool hasValidLRC = false; + if (LyricsDb.ContainsKey(DatabaseUtil.CorrectKeyFormat(_artist, _title))) { + lyricText = LyricsDb[DatabaseUtil.CorrectKeyFormat(_artist, _title)].Lyrics; + } + if (lyricText != null && (new SimpleLRC(_artist, _title, lyricText)).IsValid) + hasValidLRC = true; + + bool shouldNewTrack = true; + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK || _isInTranslation) + { + //shouldNewTrack = true; + } + else + { if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS) { if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC) @@ -727,8 +895,26 @@ _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; } - _newTrack = true; + if (hasValidLRC && _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) + _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + + //resetGUI((int)MyLyricsSettings.Screen.LRC); + + shouldNewTrack = true; } + + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS || + _SearchType == (int)SEARCH_TYPES.ONLY_LRCS) + { + resetGUI((int)MyLyricsSettings.Screen.LRC); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS); + } + + _newTrack = shouldNewTrack; + } else if (action.m_key.KeyChar.Equals(112)) // 'P' { @@ -736,22 +922,27 @@ } else if (49 <= action.m_key.KeyChar && action.m_key.KeyChar <= 57) // '1'-'9' { - int index = action.m_key.KeyChar - 49; - int noOfRows = index + 1; - - if (noOfRows <= _LrcTable.Rows.Count) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { - string status = string.Format("LRC {0} of {1} shown", noOfRows, _LrcTable.Rows.Count); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); - _LyricText = _LrcTable.Rows[index]["Lyrics"] as string; - _SimpleLrc = new SimpleLRC(null, null, _LyricText); - StartShowingLrc(_LyricText, true); + int index = action.m_key.KeyChar - 49; + int noOfRows = index + 1; + + if (noOfRows <= _LrcTable.Rows.Count) + { + string status = string.Format("LRC {0} of {1} shown", noOfRows, _LrcTable.Rows.Count); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + + _LyricText = _LrcTable.Rows[index]["Lyrics"] as string; + _SimpleLrc = new SimpleLRC(null, null, _LyricText); + StartShowingLrc(_LyricText, true); + } } } - else if (action.m_key.KeyChar.Equals(8)) // 'Backslash' + else if (action.m_key.KeyChar.Equals(8) || action.m_key.KeyChar.Equals(35)) // 'Backslash' or '#' { - RemoveLatestTagLine(); + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) + RemoveLatestTagLine(); } else if (action.m_key.KeyChar.Equals(98)) // 'B' (stop playing media) { @@ -782,7 +973,9 @@ private void ShowLrcPick() { - if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_PICK) + if (String.IsNullOrEmpty(_artist)) return; + + if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_PICK) { LrcFinder lrcFinder = new LrcFinder(); _LrcTable = lrcFinder.FindLRCs(_artist, _title); @@ -790,7 +983,20 @@ if (_LrcTable != null && _LrcTable.Rows.Count > 0) { - _LyricText = _LrcTable.Rows[0]["Lyrics"] as string; + _selectedinLRCPicker = 0; + if (_SimpleLrc != null) + { + for (int i=0; i<_LrcTable.Rows.Count; i++) + { + SimpleLRC _SimpleLrcTemp = new SimpleLRC(null, null, _LrcTable.Rows[i]["Lyrics"] as string); + if (_SimpleLrc.LyricAsLRC == _SimpleLrcTemp.LyricAsLRC) + { + _selectedinLRCPicker = i; + break; + } + } + } + _LyricText = _LrcTable.Rows[_selectedinLRCPicker]["Lyrics"] as string; _SimpleLrc = new SimpleLRC(null, null, _LyricText); StartShowingLrc(_LyricText, true); @@ -802,24 +1008,28 @@ } else { - status = string.Format("LRC {0} of {1} shown", "1", _LrcTable.Rows.Count); + status = string.Format("LRC {0} of {1} shown", _selectedinLRCPicker + 1, _LrcTable.Rows.Count); } - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else if (_LrcTable == null) { - resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); + //resetGUI((int) MyLyricsSettings.Screen.LRC_PICK); - string status = "LrcFinder could not be reached..."; + string status = "LrcFinder could not be reached"; GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + _lastLRCPickLabel = status; + _LRCPickTimer.Stop(); _LRCPickTimer.Start(); } else { //resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); - string status = "No LRC found..."; + string status = "No LRC found"; GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + _lastLRCPickLabel = status; + _LRCPickTimer.Stop(); _LRCPickTimer.Start(); //string lyricInfo = "Press the 'P' key to return"; //GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, lyricInfo); @@ -831,12 +1041,14 @@ if (_CurrentTrackTag != null) { - SaveLyricToTagLists(_CurrentTrackTag.FileName, _LyricText); + SaveLyricToTagListsData data = new SaveLyricToTagListsData(_LyricText, _artist, _title, _CurrentTrackTag.FileName); + worker.RunWorkerAsync(data); + //SaveLyricToTagLists(_CurrentTrackTag.FileName, _LyricText); } _LrcTable = null; _newTrack = true; - _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; Process(); } @@ -845,7 +1057,7 @@ protected override void OnShowContextMenu() { - GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); + GUIDialogMenu dlg = (GUIDialogMenu) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; @@ -860,7 +1072,7 @@ string translateLabelString = "Translate to " + _translationLanguage.ToLower(); dlg.Add(translateLabelString); - if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) { dlg.Add("Use picked LRC"); } @@ -869,7 +1081,7 @@ dlg.Add("Pick LRC"); } - if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) { dlg.Add("Show scrolling lyric"); } @@ -887,19 +1099,19 @@ switch (dlg.SelectedLabelText) { case "Find LRC": - _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; - _selectedScreen = (int)MyLyricsSettings.Screen.LRC; - resetGUI(_selectedScreen); + //_selectedScreen = (int) MyLyricsSettings.Screen.LRC; + resetGUI((int)MyLyricsSettings.Screen.LRC); _newTrack = true; break; case "Find lyric": - _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; - _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; - resetGUI(_selectedScreen); + //_selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; + resetGUI((int)MyLyricsSettings.Screen.LYRICS); _newTrack = true; break; @@ -908,7 +1120,7 @@ // Don't use a stream to create a LRC if (g_Player.IsRadio) { - GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg2 = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); dlg2.SetHeading("LRC editor error"); dlg2.SetLine(1, "You cannot tag a streaming"); dlg2.SetLine(2, "media due to inproper timestamps."); @@ -917,13 +1129,13 @@ return; } - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + //CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; //_lyricsFound = false; - if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + resetGUI((int) MyLyricsSettings.Screen.LRC_EDITOR); } //_newTrack = true; @@ -942,24 +1154,24 @@ case "Show scrolling lyric": case "Show static lyric": - _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; - _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; - resetGUI(_selectedScreen); + //_selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; + resetGUI((int) MyLyricsSettings.Screen.LYRICS); _newTrack = true; - if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) { - CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; - GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; + GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); } else { - CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); } break; @@ -969,9 +1181,6 @@ { TranslateProvider.TranslateProvider translate = null; - _StatusText = string.Empty; - GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); - string lyricToTranslate = string.Empty; SimpleLRC lrc = new SimpleLRC(_artist, _title, _LyricText); @@ -984,13 +1193,18 @@ lyricToTranslate = _LyricText; } + if (String.IsNullOrEmpty(lyricToTranslate)) return; + + _StatusText = string.Empty; + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); + try { ... [truncated message content] |
From: <sa...@us...> - 2010-03-03 18:47:36
|
Revision: 3479 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3479&view=rev Author: saamand Date: 2010-03-03 18:47:29 +0000 (Wed, 03 Mar 2010) Log Message: ----------- * Title string is stripped when parentheses before lyrics search, but not for LRC searches Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.dll trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.pdb Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-02 23:10:13 UTC (rev 3478) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-03 18:47:29 UTC (rev 3479) @@ -221,7 +221,6 @@ _title = _CurrentTrackTag.Title.Trim(); _title = _title.Replace("''", "'"); _title = LyricUtil.CapatalizeString(_title); - _title = LyricUtil.TrimForParenthesis(_title); GetAlbumArt(); GetAlbumArt(_artist); @@ -477,7 +476,7 @@ } else { - _StatusText = "No valid lyrics found"; + _StatusText = "No valid lyric found"; GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); } Modified: trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.dll =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/TranslateProvider/obj/Debug/TranslateProvider.pdb =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2010-03-04 20:09:32
|
Revision: 3488 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3488&view=rev Author: saamand Date: 2010-03-04 20:09:24 +0000 (Thu, 04 Mar 2010) Log Message: ----------- * Within MP LRC files were always shown/searched even when LRCFinder was deselected within configuration * First word of every other line was not translated due to inproper position of newline code '\n' Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj Property Changed: ---------------- trunk/plugins/MyLyrics/ trunk/plugins/MyLyrics/TranslateProvider/ Property changes on: trunk/plugins/MyLyrics ___________________________________________________________________ Modified: svn:ignore - *.suo *.user thumbs.db + *.suo *.user UpgradeLog.XML _UpgradeReport_Files thumbs.db Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-04 08:00:53 UTC (rev 3487) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-04 20:09:24 UTC (rev 3488) @@ -104,7 +104,7 @@ private bool _useLyricWiki; private bool _ValidLrcLyric; - // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) + // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) private Timer _WriteTagTimer; @@ -167,7 +167,7 @@ public override bool Init() { - _selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; + _selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; _startingScrollSpeedVertical = GUIGraphicsContext.ScrollSpeedVertical; GUIGraphicsContext.ScrollSpeedVertical = 0; @@ -182,9 +182,9 @@ public override void Process() { - if ((_newTrack || _SearchingState != (int) SEARCH_STATE.NOT_SEARCHING) + if ((_newTrack || _SearchingState != (int)SEARCH_STATE.NOT_SEARCHING) && (!g_Player.IsRadio || !string.IsNullOrEmpty(_artist))) - //&& (!g_Player.IsRadio || _CurrentTrackTag!=null)) + //&& (!g_Player.IsRadio || _CurrentTrackTag!=null)) { if (_newTrack) { @@ -198,7 +198,7 @@ MusicDatabase mDB = MusicDatabase.Instance; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); if (g_Player.IsRadio == false) { @@ -246,7 +246,7 @@ resetGUI(_selectedScreen); _StatusText = "No music file is playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } else @@ -266,22 +266,23 @@ _CurrentTrackTag.Lyrics = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LYRICS - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { // Get lyric if (_artist.Length != 0 && _title.Length != 0) { - if (_SearchingState == (int) SEARCH_STATE.NOT_SEARCHING) + if (_SearchingState == (int)SEARCH_STATE.NOT_SEARCHING) { - if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int) SEARCH_TYPES.ONLY_LRCS) + if (_useLrcFinder && + (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int)SEARCH_TYPES.ONLY_LRCS)) { bool lrcFoundInTagOrLyricDb = FindLrc(); if (lrcFoundInTagOrLyricDb) { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } else { @@ -301,27 +302,27 @@ } } } - else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LRC && + else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LRC && !_LyriccontrollerIsWorking) { - if (_SearchType == (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS - || _SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) + if (_SearchType == (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS + || _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) { FindLyric(); - _SearchingState = (int) SEARCH_STATE.SEARCHING_FOR_LYRIC; + _SearchingState = (int)SEARCH_STATE.SEARCHING_FOR_LYRIC; } else { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } } - else if (_SearchingState == (int) SEARCH_STATE.SEARCHING_FOR_LYRIC && + else if (_SearchingState == (int)SEARCH_STATE.SEARCHING_FOR_LYRIC && !_LyriccontrollerIsWorking) { - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; } } - else if ((_artist.Length==0 && _title.Length>0) || (_title.Length==0 && _artist.Length>0)) + else if ((_artist.Length == 0 && _title.Length > 0) || (_title.Length == 0 && _artist.Length > 0)) { //_ImagePathContainer.Clear(); //GUIelement_ImgCoverArt.FreeResources(); @@ -349,7 +350,7 @@ GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } - else if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + else if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { _newTrack = false; nextLRCLineIndex = 0; @@ -415,8 +416,8 @@ if (_lyricsFound) { - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC - || _selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC + || _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { CalculateNextInterval(); } @@ -431,7 +432,7 @@ private void ShowLRCtoEdit() { GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); - + if (!string.IsNullOrEmpty(_LyricText)) { _LyricText = _LyricText.Trim(); @@ -441,7 +442,7 @@ if (lrc.IsValid) { _alreadyValidLRC = true; - _lines = new string[1] {"This song already has a valid LRC lyric"}; + _lines = new string[1] { "This song already has a valid LRC lyric" }; _StatusText = "This song already has a valid LRC lyric"; //GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); @@ -452,21 +453,21 @@ { resetLrcFields(); - _lines = _LyricText.Split(new string[2] {"\r\n", "\n"}, StringSplitOptions.None); + _lines = _LyricText.Split(new string[2] { "\r\n", "\n" }, StringSplitOptions.None); try { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; - i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; + for (int i = _tagRoundFinished * _TAG_IN_ROUND; + i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); //GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, _lines[i]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, _lines[i]); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, "[xx:xx.xx]"); } } catch @@ -477,7 +478,7 @@ else { _StatusText = "No valid lyric found"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } if (_CurrentTrackTag == null) @@ -569,8 +570,8 @@ private void LoadSettings() { _newTrack = true; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; - _SearchType = (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + _SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; _LyricsToWriteToTag = new List<string[]>(); @@ -632,7 +633,7 @@ string translationString = (xmlreader.GetValueAsString("myLyrics", "translationLanguage", "English (en)")); - string[] strings = translationString.Split(new string[1] {"("}, StringSplitOptions.None); + string[] strings = translationString.Split(new string[1] { "(" }, StringSplitOptions.None); _translationLanguage = strings[0].Trim(); _translationLanguageCode = strings[1].Replace(")", string.Empty); @@ -714,7 +715,7 @@ sitesToSearch.Add("LyricsPluginSite"); } - _LyricSitesTosearch = (string[]) sitesToSearch.ToArray(typeof (string)); + _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); _settingsRead = true; @@ -724,17 +725,17 @@ string path = Config.GetFile(Config.Dir.Database, MLyricsDbName); FileStream fs = new FileStream(path, FileMode.Open); BinaryFormatter bf = new BinaryFormatter(); - LyricsDb = (LyricsDatabase) bf.Deserialize(fs); + LyricsDb = (LyricsDatabase)bf.Deserialize(fs); fs.Close(); path = Config.GetFile(Config.Dir.Database, MLyricsMarkedDbName); fs = new FileStream(path, FileMode.Open); - LyricsMarkedDb = (LyricsDatabase) bf.Deserialize(fs); + LyricsMarkedDb = (LyricsDatabase)bf.Deserialize(fs); fs.Close(); } catch { - GUIDialogOK dlg = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg.SetHeading("No lyric database found"); dlg.SetLine(1, "Please run the MyLyrics configuration"); dlg.SetLine(2, "before running the plugin."); @@ -757,7 +758,7 @@ if (_ImageChangeTimer == null) { _ImageChangeTimer = new Timer(); - _ImageChangeTimer.Interval = 15*1000; + _ImageChangeTimer.Interval = 15 * 1000; _ImageChangeTimer.Elapsed += OnImageTimerTickEvent; _ImageChangeTimer.Start(); } @@ -765,7 +766,7 @@ if (_LRCPickTimer == null) { _LRCPickTimer = new Timer(); - _LRCPickTimer.Interval = 3*1000; + _LRCPickTimer.Interval = 3 * 1000; _LRCPickTimer.Elapsed += OnLRCPickTimerTickEvent; _LRCPickTimer.Stop(); } @@ -785,7 +786,7 @@ if (worker.IsBusy) worker.CancelAsync(); resetAll(); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); GUIGraphicsContext.ScrollSpeedVertical = _startingScrollSpeedVertical; @@ -823,7 +824,7 @@ message.Message == GUIMessage.MessageType.GUI_MSG_LABEL_SET || message.Message == GUIMessage.MessageType.GUI_MSG_LABEL_RESET ) && - message.TargetWindowId == GetID && + message.TargetWindowId == GetID && message.TargetControlId == (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS) { _LRCPickTimer.Stop(); @@ -889,10 +890,10 @@ { if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK && !action.m_key.KeyChar.Equals(42)) ShowLrcPick(); - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) TagLine(); } - else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(48) ||action.m_key.KeyChar.Equals(101)) // '(' or '0' or 'E' - 42 is actually '(' ??? + else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(48) || action.m_key.KeyChar.Equals(101)) // '(' or '0' or 'E' - 42 is actually '(' ??? { // Don't use a stream to create a LRC if (g_Player.IsRadio) @@ -901,7 +902,7 @@ } _lyricsFound = false; - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); ShowLRCtoEdit(); @@ -934,7 +935,7 @@ GUIGraphicsContext.ScrollSpeedVertical = 8; else if (GUIGraphicsContext.ScrollSpeedVertical >= 4) GUIGraphicsContext.ScrollSpeedVertical = 7; // MediaPortal BUG here, scroll 6 gets many errors in log: - //GUITextScrollUpControl.cs: if (_frameLimiter % (6 - GUIGraphicsContext.ScrollSpeedVertical) == 0) + //GUITextScrollUpControl.cs: if (_frameLimiter % (6 - GUIGraphicsContext.ScrollSpeedVertical) == 0) else if (GUIGraphicsContext.ScrollSpeedVertical >= 2) GUIGraphicsContext.ScrollSpeedVertical = 4; else if (GUIGraphicsContext.ScrollSpeedVertical >= 0) @@ -984,7 +985,7 @@ } else { - _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; } } else if (_SearchType == (int)SEARCH_TYPES.ONLY_LRCS) @@ -993,12 +994,26 @@ } else { - _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; } if (hasValidLRC && _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + if (_SearchType != (int)SEARCH_TYPES.ONLY_LYRICS && !_useLrcFinder) + { + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; + + GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + dlg2.SetHeading("LRC screen disabled"); + dlg2.SetLine(1, "You have not enabled LRCFinder"); + dlg2.SetLine(2, "in configuration and have thereby"); + dlg2.SetLine(3, "disabled the LRC screen."); + dlg2.DoModal(GUIWindowManager.ActiveWindow); + + return; + } + //resetGUI((int)MyLyricsSettings.Screen.LRC); shouldNewTrack = true; @@ -1076,7 +1091,7 @@ { if (String.IsNullOrEmpty(_artist)) return; - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_PICK) { LrcFinder lrcFinder = new LrcFinder(); _LrcTable = lrcFinder.FindLRCs(_artist, _title); @@ -1085,12 +1100,12 @@ if (_LrcTable != null && _LrcTable.Rows.Count > 0) { _selectedinLRCPicker = 0; - if (_SimpleLrc != null) + if (_SimpleLrc != null) { - for (int i=0; i<_LrcTable.Rows.Count; i++) + for (int i = 0; i < _LrcTable.Rows.Count; i++) { SimpleLRC _SimpleLrcTemp = new SimpleLRC(null, null, _LrcTable.Rows[i]["Lyrics"] as string); - if (_SimpleLrc.LyricAsLRC == _SimpleLrcTemp.LyricAsLRC) + if (_SimpleLrc.LyricAsLRC == _SimpleLrcTemp.LyricAsLRC) { _selectedinLRCPicker = i; break; @@ -1112,7 +1127,7 @@ status = string.Format("LRC {0} of {1} shown", _selectedinLRCPicker + 1, _LrcTable.Rows.Count); } - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else if (_LrcTable == null) { @@ -1148,12 +1163,12 @@ //worker.RunWorkerAsync(data); //SaveLyricToTagLists(_CurrentTrackTag.FileName, _LyricText); SaveLyricToTagLists(this, new DoWorkEventArgs(data)); - + } _LrcTable = null; _newTrack = true; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; Process(); } @@ -1162,7 +1177,7 @@ protected override void OnShowContextMenu() { - GUIDialogMenu dlg = (GUIDialogMenu) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_MENU); + GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU); if (dlg == null) { return; @@ -1177,7 +1192,7 @@ string translateLabelString = "Translate to " + _translationLanguage.ToLower(); dlg.Add(translateLabelString); - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { dlg.Add("Use picked LRC"); } @@ -1186,7 +1201,7 @@ dlg.Add("Pick LRC"); } - if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) { dlg.Add("Show scrolling lyric"); } @@ -1204,16 +1219,28 @@ switch (dlg.SelectedLabelText) { case "Find LRC": - _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; + if (_useLrcFinder) + { + _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; - //_selectedScreen = (int) MyLyricsSettings.Screen.LRC; - resetGUI((int)MyLyricsSettings.Screen.LRC); + //_selectedScreen = (int) MyLyricsSettings.Screen.LRC; + resetGUI((int) MyLyricsSettings.Screen.LRC); - _newTrack = true; + _newTrack = true; + } + else + { + GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + dlg2.SetHeading("LRC screen disabled"); + dlg2.SetLine(1, "You have not enabled LRCFinder"); + dlg2.SetLine(2, "in configuration and have thereby"); + dlg2.SetLine(3, "disabled the LRC screen."); + dlg2.DoModal(GUIWindowManager.ActiveWindow); + } break; case "Find lyric": - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; //_selectedScreen = (int) MyLyricsSettings.Screen.LYRICS; resetGUI((int)MyLyricsSettings.Screen.LYRICS); @@ -1225,7 +1252,7 @@ // Don't use a stream to create a LRC if (g_Player.IsRadio) { - GUIDialogOK dlg2 = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg2.SetHeading("LRC editor error"); dlg2.SetLine(1, "You cannot tag a streaming"); dlg2.SetLine(2, "media due to inproper timestamps."); @@ -1234,13 +1261,13 @@ return; } - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); //CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; //_lyricsFound = false; - if (_selectedScreen != (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int) MyLyricsSettings.Screen.LRC_EDITOR); + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); } //_newTrack = true; @@ -1259,24 +1286,24 @@ case "Show scrolling lyric": case "Show static lyric": - _SearchType = (int) SEARCH_TYPES.ONLY_LYRICS; + _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; //_selectedScreen = (int)MyLyricsSettings.Screen.LYRICS; - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); _newTrack = true; - if (CONTROL_LYRIC_SELECTED == (int) GUI_Lyrics_Controls.CONTROL_Lyric) + if (CONTROL_LYRIC_SELECTED == (int)GUI_Lyrics_Controls.CONTROL_Lyric) { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; - GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll; + GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } else { - CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; - GUIControl.HideControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); - GUIControl.ShowControl(GetID, (int) GUI_Lyrics_Controls.CONTROL_Lyric); + CONTROL_LYRIC_SELECTED = (int)GUI_Lyrics_Controls.CONTROL_Lyric; + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } break; @@ -1309,7 +1336,7 @@ } catch (FileNotFoundException ex) { - GUIDialogOK dlg3 = (GUIDialogOK) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_OK); + GUIDialogOK dlg3 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg3.SetHeading("File not found"); dlg3.SetLine(1, "The TranslateProvider.dll assembly"); dlg3.SetLine(2, "could not be found."); @@ -1321,15 +1348,19 @@ bool reliable; double confidence; + lyricToTranslate = lyricToTranslate.Replace("\n", "\n "); + string translation = translate.Translate(lyricToTranslate, _translationLanguageCode, out detectedLanguage, out reliable, out confidence, "\n"); + translation = translation.Replace("\n ", "\n"); + translation = MediaPortalUtil.MakePlainLyricPerfectToShow(translation); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); _isInTranslation = true; GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, translation); - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_TITLE, + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, string.Format("{0} translation", _translationLanguage)); GUIControl.FocusControl(GetID, CONTROL_LYRIC_SELECTED); @@ -1352,8 +1383,8 @@ StopThread(); resetAll(); _newTrack = true; - _SearchType = (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; Process(); } else @@ -1368,7 +1399,7 @@ resetGUI(_selectedScreen); _StatusText = "No music file is playing"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } } else if (g_Player.IsRadio) @@ -1380,7 +1411,7 @@ || string.IsNullOrEmpty(GUIPropertyManager.GetProperty("#Play.Current.Title"))) { _StatusText = "Stream info not complete"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } else if (!g_Player.CurrentFile.Equals(_LastStreamFile) || !newArtist.Equals(_artist) || !newTitle.Equals(_title)) @@ -1389,8 +1420,8 @@ StopThread(); resetAll(); - _SearchType = (int) SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; - _SearchingState = (int) SEARCH_STATE.NOT_SEARCHING; + _SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + _SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; _LastStreamFile = g_Player.CurrentFile; @@ -1434,7 +1465,7 @@ GUIControl.ClearControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, ""); - resetGUI((int) MyLyricsSettings.Screen.LRC); + resetGUI((int)MyLyricsSettings.Screen.LRC); if ((_CurrentTrackTag != null && _CurrentTrackTag.Artist != "") || g_Player.IsRadio) { @@ -1456,10 +1487,10 @@ 6) Search for lyric */ // (1 of 2) Search LRCS - if (_SearchType != (int) SEARCH_TYPES.ONLY_LYRICS) + if (_SearchType != (int)SEARCH_TYPES.ONLY_LYRICS) { _StatusText = "Searching for a matching LRC..."; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); #region 1) LRC in music tag @@ -1525,7 +1556,7 @@ { _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; _StatusText = "No matching LRC found"; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); } #endregion @@ -1563,15 +1594,15 @@ lyricText = LyricsDb[DatabaseUtil.CorrectKeyFormat(_artist, _title)].Lyrics; } - if (_SearchType != (int) SEARCH_TYPES.ONLY_LRCS) + if (_SearchType != (int)SEARCH_TYPES.ONLY_LRCS) { #region 4) Lyric in music tag if (_AutomaticReadFromMusicTag && g_Player.IsRadio == false && _CurrentTrackTag != null && _CurrentTrackTag.Lyrics.Length != 0 && - !((_SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) && - new SimpleLRC(_artist, _title, _CurrentTrackTag.Lyrics).IsValid)) + !((!_useLrcFinder && + new SimpleLRC(_artist, _title, _CurrentTrackTag.Lyrics).IsValid))) { string lyric = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); _CurrentTrackTag.Lyrics = lyric; @@ -1585,22 +1616,22 @@ #region 5) Lyric in music database if (lyricText.Length != 0 && - !((_SearchType == (int) SEARCH_TYPES.ONLY_LYRICS) && _CurrentTrackTag != null && - new SimpleLRC(_artist, _title, lyricText).IsValid)) + !((!_useLrcFinder && _CurrentTrackTag != null && + new SimpleLRC(_artist, _title, lyricText).IsValid))) { LyricFound = new Object[] { lyricText, _artist, _title, "lyrics database" }; return true; } - #endregion + #endregion - #region 6) Search the Internet for a lyric + #region 6) Search the Internet for a lyric else if (_LyricSitesTosearch.Length > 0) { _StatusText = "Searching for a matching lyric..."; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); - resetGUI((int) MyLyricsSettings.Screen.LYRICS); + resetGUI((int)MyLyricsSettings.Screen.LYRICS); _lyricsFound = false; @@ -1664,22 +1695,22 @@ if (showLrcPickScreen) { - resetGUI((int) MyLyricsSettings.Screen.LRC_PICK); + resetGUI((int)MyLyricsSettings.Screen.LRC_PICK); } else { - resetGUI((int) MyLyricsSettings.Screen.LRC); + resetGUI((int)MyLyricsSettings.Screen.LRC); } _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; _StatusText = ""; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); _LyricText = lyricText; try { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; i++) + for (int i = _tagRoundFinished * _TAG_IN_ROUND; i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { if (useEditControlsOnLRCPick() && _selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { @@ -1693,13 +1724,13 @@ } } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { - for (int i = _tagRoundFinished*_TAG_IN_ROUND; i < (_tagRoundFinished + 1)*_TAG_IN_ROUND; i++) + for (int i = _tagRoundFinished * _TAG_IN_ROUND; i < (_tagRoundFinished + 1) * _TAG_IN_ROUND; i++) { SimpleLRCTimeAndLine currentLine = _LrcTimeCollection[i]; - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, currentLine.TimeString); } } @@ -1711,7 +1742,7 @@ private void TagLine() { - if (_alreadyValidLRC == false && _selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_alreadyValidLRC == false && _selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { if (_Stopwatch == null) return; @@ -1751,9 +1782,9 @@ for (int i = 0; i < _TAG_IN_ROUND && _LRCLinesTotal + i < _lines.Length; i++) { GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i]); + _lines[_tagRoundFinished * _TAG_IN_ROUND + i]); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, @@ -1811,7 +1842,7 @@ SaveLyricToTagLists(this, new DoWorkEventArgs(data)); } - _selectedScreen = (int) MyLyricsSettings.Screen.LRC; + _selectedScreen = (int)MyLyricsSettings.Screen.LRC; ShowLyricOnScreen(_LyricText, "MediaPortal"); // Upload LRC to LrcFinder if user has accepted in configuration @@ -1822,7 +1853,7 @@ else if (_alwaysAskUploadLrcToLrcFinder || !_confirmedNoUploadLrcToLrcFinder) { GUIDialogYesNo dlgYesNo = - (GUIDialogYesNo) GUIWindowManager.GetWindow((int) Window.WINDOW_DIALOG_YES_NO); + (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO); if (dlgYesNo != null) { dlgYesNo.SetHeading("Upload to LRCFinder?"); @@ -1867,12 +1898,12 @@ if (lrcUploaded) { string status = "Your LRC was successfully uploaded"; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } else { string status = "LrcFinder could not be reached"; - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, status); } } @@ -1891,21 +1922,21 @@ if (--nextLRCLineIndex < 0) { - nextLRCLineIndex = _TAG_IN_ROUND-1; + nextLRCLineIndex = _TAG_IN_ROUND - 1; --_tagRoundFinished; try { for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(0, 9)); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(9)); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, - _lines[_tagRoundFinished*_TAG_IN_ROUND + i].Substring(9)); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(0, 9)); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(9)); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, + _lines[_tagRoundFinished * _TAG_IN_ROUND + i].Substring(9)); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); } } catch @@ -1913,9 +1944,9 @@ ; } - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, "[xx:xx.xx]"); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex, @@ -1925,9 +1956,9 @@ } else { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + nextLRCLineIndex); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + nextLRCLineIndex); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + nextLRCLineIndex, "[xx:xx.xx]"); } } @@ -1937,7 +1968,7 @@ { if (_LrcTimeCollection != null) { - int trackTime = (int) (g_Player.CurrentPosition*1000); + int trackTime = (int)(g_Player.CurrentPosition * 1000); nextLRCLineIndex = _LrcTimeCollection.GetSimpleLRCTimeAndLineIndex(trackTime); SimpleLRCTimeAndLine currentLine = _LrcTimeCollection[nextLRCLineIndex]; @@ -2027,14 +2058,14 @@ } } - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_PICK) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { for (int i = 0; i < _TAG_IN_ROUND; i++) { SimpleLRCTimeAndLine currentLineTime = - _LrcTimeCollection[_tagRoundFinished*_TAG_IN_ROUND + i]; - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, + _LrcTimeCollection[_tagRoundFinished * _TAG_IN_ROUND + i]; + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, (currentLineTime != null ? currentLineTime.TimeString : string.Empty)); @@ -2107,9 +2138,9 @@ _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; _StatusText = ""; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, _StatusText); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _StatusText); - if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { ShowLRCtoEdit(); } @@ -2123,7 +2154,7 @@ _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; StartShowingLrc(_LyricText, false); } - // else show plain lyric + // else show plain lyric else { _SearchType = (int)SEARCH_TYPES.ONLY_LYRICS; @@ -2248,28 +2279,28 @@ GUIPropertyManager.OnPropertyChanged -= TimeHandler; - if (_selectedScreen == (int) MyLyricsSettings.Screen.LYRICS) + if (_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS) { - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_TITLE, "Lyrics screen"); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics screen"); GUIControl.ClearControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.FocusControl(GetID, CONTROL_LYRIC_SELECTED); // Reset general and lyrics controls - GUIControl.ShowControl(GetID, (int) GUI_General_Controls.CONTROL_LBStatus); + GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.HideControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.ShowControl(GetID, CONTROL_LYRIC_SELECTED); GUIControl.SetControlLabel(GetID, CONTROL_LYRIC_SELECTED, ""); // album art only visible for basic screen - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_CURRENTLY); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_DURATION); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUM); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_YEAR); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUMART); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESS); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_DURATION); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUM); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_YEAR); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUMART); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESS); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); // Hide LRC controls GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, ""); @@ -2278,12 +2309,12 @@ for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } for (int i = 0; i < 5; i++) @@ -2293,26 +2324,26 @@ } } - else if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC) + else if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC) { - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_TITLE, "LRC screen"); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC screen"); GUIControl.FocusControl(GetID, CONTROL_LYRIC_SELECTED); // Lyrics controls - GUIControl.ShowControl(GetID, (int) GUI_General_Controls.CONTROL_LBStatus); + GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); //GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, ""); GUIControl.HideControl(GetID, CONTROL_LYRIC_SELECTED); // album art only visible for basic screen - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_CURRENTLY); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_DURATION); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUM); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_YEAR); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUMART); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESS); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_DURATION); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUM); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_YEAR); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUMART); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESS); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); // LRC controls GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, ""); @@ -2322,22 +2353,22 @@ for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); } if (string.IsNullOrEmpty(_artist)) { for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); } } @@ -2349,26 +2380,26 @@ } - else if (_selectedScreen == (int) MyLyricsSettings.Screen.LRC_EDITOR) + else if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { GUIPropertyManager.OnPropertyChanged += TimeHandler; - GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_TITLE, "LRC editor"); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC editor"); // Lyrics controls - GUIControl.ShowControl(GetID, (int) GUI_General_Controls.CONTROL_LBStatus); + GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); //GUIControl.SetControlLabel(GetID, (int) GUI_General_Controls.CONTROL_LBStatus, ""); GUIControl.HideControl(GetID, CONTROL_LYRIC_SELECTED); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_CURRENTLY); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_DURATION); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUM); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_YEAR); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_ALBUMART); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESS); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_DURATION); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUM); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_YEAR); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_NOWPLAYINGBACK); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUMART); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESS); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); // LRC controls GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, "Tag line"); @@ -2378,15 +2409,15 @@ for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); //GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); - GUIControl.ShowControl(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.HideControl(GetID, (int) GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } for (int i = 0; i < 5; i++) @@ -2396,23 +2427,23 @@ } }... [truncated message content] |
From: <Sil...@us...> - 2010-03-08 09:20:26
|
Revision: 3494 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3494&view=rev Author: SilentException Date: 2010-03-08 09:20:18 +0000 (Mon, 08 Mar 2010) Log Message: ----------- * removed old _UpgradeReport_Files and UpgradeLog.XML Removed Paths: ------------- trunk/plugins/MyLyrics/UpgradeLog.XML trunk/plugins/MyLyrics/_UpgradeReport_Files/ Deleted: trunk/plugins/MyLyrics/UpgradeLog.XML =================================================================== --- trunk/plugins/MyLyrics/UpgradeLog.XML 2010-03-08 09:12:28 UTC (rev 3493) +++ trunk/plugins/MyLyrics/UpgradeLog.XML 2010-03-08 09:20:18 UTC (rev 3494) @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog> -<Properties><Property Name="Solution" Value="MyLyrics"> -</Property><Property Name="Solution File" Value="C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\MyLyrics.sln"> -</Property><Property Name="User Options File" Value="C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\MyLyrics.suo"> -</Property><Property Name="Date" Value="21. oktober 2008"> -</Property><Property Name="Time" Value="18:15"> -</Property></Properties><Event ErrorLevel="0" Project="" Source="MyLyrics.sln" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\MyLyrics.sln"> -</Event><Event ErrorLevel="0" Project="" Source="MyLyrics.suo" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\MyLyrics.suo"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsEngine.csproj" Description="Project file successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsEngine.csproj"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsEngine.csproj.user" Description="Project user file successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsEngine.csproj.user"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LRC\SimpleLRC.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LRC\SimpleLRC.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LRC\SimpleLRCFormat.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LRC\SimpleLRCFormat.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LRC\SimpleLRCTimeAndLine.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LRC\SimpleLRCTimeAndLine.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LRC\SimpleLRCTimeAndLineCollection.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LRC\SimpleLRCTimeAndLineCollection.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsDatabase\LyricsDatabase.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsDatabase\LyricsDatabase.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsDatabase\LyricsItem.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsDatabase\LyricsItem.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricSearch.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricSearch.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricDiagnostics.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricDiagnostics.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\Actionext.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\Actionext.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\HotLyrics.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\HotLyrics.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\EvilLabs.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\EvilLabs.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\Lyrics007.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\Lyrics007.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\LyricsOnDemand.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\LyricsOnDemand.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\SeekLyrics.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\SeekLyrics.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Properties\AssemblyInfo.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Properties\AssemblyInfo.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\ICommand.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\ICommand.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\ILyricForm.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\ILyricForm.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsController.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsController.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricUtil.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricUtil.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Properties\Resources.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Properties\Resources.Designer.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Properties\Settings.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Properties\Settings.Designer.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Setup.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Setup.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\Reference.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\Reference.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsSites\Wiki.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\LyricsSites\Wiki.cs"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\app.config" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\app.config"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Properties\Settings.settings" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Properties\Settings.settings"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\LyricsResult.datasource" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\LyricsResult.datasource"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\Reference.map" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\Reference.map"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\server.wsdl" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\server.wsdl"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\SongResult.datasource" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\SongResult.datasource"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Web References\org.lyricwiki\SOTDResult.datasource" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Web References\org.lyricwiki\SOTDResult.datasource"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\Properties\Resources.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\LyricsEngine\Properties\Resources.resx"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsEngine.csproj" Description="Project converted successfully"> -</Event><Event ErrorLevel="3" Project="LyricsEngine" Source="LyricsEngine\LyricsEngine.csproj" Description="Converted"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics.csproj" Description="Project file successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics.csproj"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics.csproj.user" Description="Project user file successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics.csproj.user"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\Convert\ConvertFromXMLtoLyricsDatabase.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\Convert\ConvertFromXMLtoLyricsDatabase.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MediaPortalUtil.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MediaPortalUtil.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ExportTags.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ExportTags.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ExportTags.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ExportTags.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ImportTags.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ImportTags.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ImportTags.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ImportTags.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\About.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\About.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\About.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\About.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyricsExternCode.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyricsExternCode.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyricsSettings.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyricsSettings.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MyLyricsSetup_test.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MyLyricsSetup_test.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\DatabaseUtil.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\DatabaseUtil.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MyLyricsSetup.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MyLyricsSetup.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MyLyricsSetup.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MyLyricsSetup.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\AddNewSong.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\AddNewSong.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\AddNewSong.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\AddNewSong.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\Properties\AssemblyInfo.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\Properties\AssemblyInfo.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\LyricsLibrary.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\LyricsLibrary.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\LyricsLibrary.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\LyricsLibrary.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\Properties\Resources.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\Properties\Resources.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\FindLyric.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\FindLyric.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\FindLyric.Designer.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\FindLyric.Designer.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\TagReaderUtil.cs" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\TagReaderUtil.cs"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ExportTags.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ExportTags.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\ImportTags.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\ImportTags.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\About.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\About.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\LyricsLibrary.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\LyricsLibrary.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MusicDatabaseBrowse.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\MyLyricsSetup.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\MyLyricsSetup.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\AddNewSong.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\AddNewSong.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\Properties\Resources.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\Properties\Resources.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics Configuration\FindLyric.resx" Description="File successfully backed up as C:\Users\saamand\Documents\Visual Studio 2008\Projects\MyLyrics\Backup\My Lyrics\MyLyrics Configuration\FindLyric.resx"> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics.csproj" Description="Project converted successfully"> -</Event><Event ErrorLevel="3" Project="MyLyrics" Source="My Lyrics\MyLyrics.csproj" Description="Converted"> -</Event><Event ErrorLevel="0" Project="" Source="MyLyrics.sln" Description="Solution converted successfully"> -</Event><Event ErrorLevel="3" Project="" Source="MyLyrics.sln" Description="Converted"> -</Event><Event ErrorLevel="0" Project="LyricsEngine" Source="LyricsEngine\LyricsEngine.csproj" Description="Scan complete: Upgrade not required for project files."> -</Event><Event ErrorLevel="0" Project="MyLyrics" Source="My Lyrics\MyLyrics.csproj" Description="Scan complete: Upgrade not required for project files."> -</Event></UpgradeLog> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2010-03-14 09:41:26
|
Revision: 3501 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3501&view=rev Author: saamand Date: 2010-03-14 09:41:18 +0000 (Sun, 14 Mar 2010) Log Message: ----------- Release 1.5.0.0 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt trunk/plugins/MyLyrics/Skin/Blue3wide/myLyrics.xml Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-03-14 09:41:18 UTC (rev 3501) @@ -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("1.42")] +[assembly: AssemblyVersion("1.5.0.0")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-03-14 09:41:18 UTC (rev 3501) @@ -80,7 +80,7 @@ this.lbInfo1.Name = "lbInfo1"; this.lbInfo1.Size = new System.Drawing.Size(197, 18); this.lbInfo1.TabIndex = 3; - this.lbInfo1.Text = "MyLyrics plugin, version 1.42"; + this.lbInfo1.Text = "MyLyrics plugin, version 1.5.0.0"; // // label2 // Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-03-14 09:41:18 UTC (rev 3501) @@ -2460,7 +2460,7 @@ GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); // LRC controls - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, "Tag line"); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, "Tag"); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON); GUIControl.FocusControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON); //GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS); @@ -2504,7 +2504,7 @@ GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); // LRC controls - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, "Pick LRC"); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, "Pick"); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON); GUIControl.FocusControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON); //GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON, ""); Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-03-14 09:41:18 UTC (rev 3501) @@ -34,5 +34,5 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.42")] -[assembly: AssemblyFileVersion("1.42")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.0.0")] \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-03-14 09:41:18 UTC (rev 3501) @@ -1,4 +1,4 @@ -Release notes to MyLyrics 1.4.3.0 +Release notes to MyLyrics 1.5.0.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,7 +33,7 @@ Compatible with MediaPortal 1.0.2, MediaPortal 1.1.0 Beta and MediaPortal 1.1.0 RC1 -Changes and fixes since version 1.4.2.0 (by me): +Changes and fixes since version 1.4.2.0 (by mackey): * Fix: Compatible with MediaPortal 1.1.0 RC * Fix: Titles starting with parentheses wasn't always handled correctly * Fix: Within MP LRC files were always shown/searched even when LRCFinder was deselected within configuration Modified: trunk/plugins/MyLyrics/Skin/Blue3wide/myLyrics.xml =================================================================== --- trunk/plugins/MyLyrics/Skin/Blue3wide/myLyrics.xml 2010-03-12 22:57:50 UTC (rev 3500) +++ trunk/plugins/MyLyrics/Skin/Blue3wide/myLyrics.xml 2010-03-14 09:41:18 UTC (rev 3501) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> <id>90478</id> <defaultcontrol>20</defaultcontrol> @@ -6,47 +6,71 @@ <define>#header.label:5</define> <define>#header.image:music_logo.png</define> <define>#header.hover:hover_music.png</define> + <!-- cheat a little, we don't use two of the items in the imported file to blank their labels --> <define>#itemcount:-</define> <define>#selecteditem:-</define> <controls> <import>common.window.xml</import> <control> - <id>2</id> - <description>Screen Title</description> <type>label</type> + <description>Screen Title</description> + <id>2</id> <posX>225</posX> <posY>75</posY> - <font>font12</font> - <textcolor>80ffffff</textcolor> <label>Titel</label> + <font>font12</font> + <textcolor>ffffffff</textcolor> </control> <control> - <id>20</id> - <description>The Lyric area</description> <type>textbox</type> - <onleft>950</onleft> - <onright>950</onright> + <description>The Lyric area</description> + <id>20</id> <posX>110</posX> <posY>125</posY> <width>760</width> <height>490</height> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + <image>icon-folder.png</image> + <seperator>----------------------------------------------------------------------------------------------</seperator> + <text>6</text> + <font>font12</font> <spinPosX>1100</spinPosX> <spinPosY>545</spinPosY> - <font>font12</font> + </control> + <control> + <type>textbox</type> + <description>The Lyric area wide</description> + <id>21</id> + <posX>110</posX> + <posY>125</posY> + <width>1160</width> + <height>490</height> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> <image>icon-folder.png</image> <seperator>----------------------------------------------------------------------------------------------</seperator> <text>6</text> + <font>font12</font> + <spinPosX>1100</spinPosX> + <spinPosY>545</spinPosY> </control> <control> - <id>1020</id> - <description>The Lyric area</description> <type>textboxscrollup</type> - <onleft>950</onleft> - <onright>950</onright> + <description>The Lyric area</description> + <id>1020</id> <posX>110</posX> <posY>125</posY> <width>760</width> <height>450</height> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> <image>icon-folder.png</image> <seperator>----------------------------------------------------------------------------------------------</seperator> <text>6</text> @@ -55,87 +79,116 @@ <spinPosY>545</spinPosY> </control> <control> - <id>11</id> - <description>Status</description> + <type>textboxscrollup</type> + <description>The Lyric area wide</description> + <id>1021</id> + <posX>110</posX> + <posY>125</posY> + <width>1160</width> + <height>450</height> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + <image>icon-folder.png</image> + <seperator>----------------------------------------------------------------------------------------------</seperator> + <text>6</text> + <font>font12</font> + <spinPosX>1150</spinPosX> + <spinPosY>545</spinPosY> + </control> + <control> <type>label</type> + <description>Status</description> + <id>11</id> <posX>110</posX> <posY>120</posY> + <label>No media playing</label> <font>font12</font> <textcolor>80ffffff</textcolor> - <label>No media playing</label> </control> <control> - <id>1011</id> - <description>LrcPick status</description> <type>label</type> + <description>LrcPick status</description> + <id>1011</id> <posX>900</posX> <posY>46</posY> + <label></label> <font>font13</font> <textcolor>ffdddddd</textcolor> - <label/> - </control> + </control> <control> - <id>34</id> - <description>menu background image</description> <type>image</type> + <description>menu background image</description> + <id>34</id> <posX>30</posX> <posY>570</posY> <width>1225</width> <height>160</height> <texture>osd_bg.png</texture> - <animation effect="Fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>33</id> - <description>track label</description> <type>fadelabel</type> + <description>track label</description> + <id>33</id> <posX>170</posX> <posY>670</posY> <width>600</width> <height>28</height> - <font>font16</font> <label>#Play.Current.Track</label> - <animation effect="Fade" time="150">WindowOpen</animation> + <font>font16</font> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>32</id> - <description>track label</description> <type>fadelabel</type> + <description>track label</description> + <id>32</id> <posX>170</posX> <posY>634</posY> <width>600</width> - <height>28</height> - <font>font16</font> + <height>26</height> <label>#Play.Current.Artist</label> - <animation effect="Fade" time="150">WindowOpen</animation> + <font>font16</font> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>30</id> - <description>track label</description> <type>fadelabel</type> + <description>track label</description> + <id>30</id> <posX>170</posX> <posY>590</posY> <width>600</width> - <height>30</height> - <font>font18</font> + <height>26</height> <label>#Play.Current.Title</label> - <animation effect="Fade" time="150">WindowOpen</animation> + <font>font18</font> + <animation effect="fade" time="150">WindowOpen</animation> </control> + + <!--<control> + <type>image</type> + <description>title image</description> + <id>35</id> + <posX>113</posX> + <posY>26</posY> + <texture flipY="true" diffuse="Thumb_Mask.png">music_logo.png</texture> + <animation effect="fade" time="150">WindowOpen</animation> + </control>--> <control> - <id>31</id> - <description>nowplaying background</description> <type>image</type> + <description>nowplaying background</description> + <id>31</id> <posX>886</posX> <posY>56</posY> <width>400</width> <height>484</height> <texture>nowplaying_background.png</texture> - <animation effect="Fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>112</id> - <description>album art image</description> <type>image</type> + <description>album art image</description> + <id>112</id> <posX>908</posX> <posY>122</posY> <width>350</width> @@ -145,914 +198,829 @@ <zoom>yes</zoom> </control> <control> - <id>27</id> - <description>year label</description> <type>fadelabel</type> + <description>year label</description> + <id>27</id> <posX>1258</posX> <posY>86</posY> <width>150</width> - <font>font13</font> - <align>RIGHT</align> <label>#Play.Current.Year</label> + <font>font13</font> + <align>right</align> </control> <control> - <id>26</id> - <description>album label</description> <type>label</type> + <description>album label</description> + <id>26</id> <posX>908</posX> <posY>86</posY> <width>230</width> - <font>font13</font> - <align>LEFT</align> <label>#Play.Current.Album</label> - <animation effect="Fade" time="150">WindowOpen</animation> + <font>font13</font> + <align>left</align> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>117</id> <type>image</type> + <id>117</id> <posX>970</posX> <posY>482</posY> <width>220</width> <texture>osd_progress_background.png</texture> - <animation effect="Fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>118</id> - <description>track progress</description> <type>progress</type> + <description>track progress</description> + <id>118</id> <posX>960</posX> <posY>482</posY> <width>240</width> + <label>#percentage</label> + <visible>player.hasmedia</visible> </control> <control> - <id>24</id> - <description>track progress label</description> <type>label</type> + <description>track progress label</description> + <id>24</id> <posX>908</posX> <posY>482</posY> + <label>#currentplaytime</label> <font>font14</font> + <align>left</align> <textcolor>80ffffff</textcolor> - <align>LEFT</align> - <label>#currentplaytime</label> - <animation effect="Fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowOpen</animation> </control> <control> - <id>25</id> - <description>track duration label</description> <type>label</type> + <description>track duration label</description> + <id>25</id> <posX>1258</posX> <posY>482</posY> + <label>#duration</label> <font>font14</font> + <align>right</align> <textcolor>80ffffff</textcolor> - <align>RIGHT</align> - <label>#duration</label> </control> <control> - <id>20</id> - <description>up next label</description> <type>label</type> + <description>up next label</description> + <id>20</id> <posX>1189</posX> <posY>597</posY> + <label>4541</label> <font>font14</font> + <align>right</align> <textcolor>80ffffff</textcolor> - <align>RIGHT</align> - <label>4541</label> </control> <control> - <id>121</id> - <description>next track label</description> <type>fadelabel</type> + <description>next track label</description> + <id>121</id> <posX>1187</posX> <posY>674</posY> <width>300</width> - <textcolor>80ffffff</textcolor> - <align>RIGHT</align> <label>#Play.Next.Title</label> + <align>right</align> + <textcolor>80ffffff</textcolor> </control> <control> - <id>123</id> - <description>next artist label</description> <type>fadelabel</type> + <description>next artist label</description> + <id>123</id> <posX>1185</posX> <posY>640</posY> <width>300</width> - <textcolor>80ffffff</textcolor> - <align>RIGHT</align> <label>#Play.Next.Artist</label> + <align>right</align> + <textcolor>80ffffff</textcolor> </control> <control> - <id>400</id> - <description>line 0</description> <type>label</type> - <colordiffuse>80ffffff</colordiffuse> + <description>line 0</description> + <id>400</id> + <width>1160</width> <posX>112</posX> <posY>120</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> + <colordiffuse>80ffffff</colordiffuse> <label>line 0</label> + + <textcolor>80ffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> <control> - <id>500</id> - <description>line 0</description> <type>label</type> + <description>line 0</description> + <id>500</id> + <width>1160</width> <posX>112</posX> <posY>120</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 0</label> + + <textcolor>ffffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> <control> - <id>401</id> - <description>line 1</description> <type>label</type> + <description>line 1</description> + <id>401</id> + <width>1160</width> <posX>112</posX> <posY>152</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 1</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>501</id> - <description>line 1</description> <type>label</type> + <description>line 1</description> + <id>501</id> + <width>1160</width> <posX>112</posX> <posY>152</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 1</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>402</id> - <description>line 2</description> <type>label</type> + <description>line 2</description> + <id>402</id> + <width>1160</width> <posX>112</posX> <posY>184</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 2</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>502</id> - <description>line 2</description> <type>label</type> + <description>line 2</description> + <id>502</id> + <width>1160</width> <posX>112</posX> <posY>184</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 2</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>403</id> - <description>line 3</description> <type>label</type> + <description>line 3</description> + <id>403</id> + <width>1160</width> <posX>112</posX> <posY>216</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 3</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>503</id> - <description>line 3</description> <type>label</type> + <description>line 3</description> + <id>503</id> + <width>1160</width> <posX>112</posX> <posY>216</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 3</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>404</id> - <description>line 4</description> <type>label</type> + <description>line 4</description> + <id>404</id> + <width>1160</width> <posX>112</posX> <posY>248</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 4</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>504</id> - <description>line 4</description> <type>label</type> + <description>line 4</description> + <id>504</id> + <width>1160</width> <posX>112</posX> <posY>248</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 4</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>405</id> - <description>line 5</description> <type>label</type> + <description>line 5</description> + <id>405</id> + <width>1160</width> <posX>112</posX> <posY>280</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 5</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>505</id> - <description>line 5</description> <type>label</type> + <description>line 5</description> + <id>505</id> + <width>1160</width> <posX>112</posX> <posY>280</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 5</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>406</id> - <description>line 6</description> <type>label</type> + <description>line 6</description> + <id>406</id> + <width>1160</width> <posX>112</posX> <posY>312</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 6</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>506</id> - <description>line 6</description> <type>label</type> + <description>line 6</description> + <id>506</id> + <width>1160</width> <posX>112</posX> <posY>312</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 6</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>407</id> - <description>line 7</description> <type>label</type> + <description>line 7</description> + <id>407</id> + <width>1160</width> <posX>112</posX> <posY>344</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 7</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>507</id> - <description>line 7</description> <type>label</type> + <description>line 7</description> + <id>507</id> + <width>1160</width> <posX>112</posX> <posY>344</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 7</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>408</id> - <description>line 8</description> <type>label</type> + <description>line 8</description> + <id>408</id> + <width>1160</width> <posX>112</posX> <posY>376</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 8</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>508</id> - <description>line 8</description> <type>label</type> + <description>line 8</description> + <id>508</id> + <width>1160</width> <posX>112</posX> <posY>376</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 8</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>409</id> - <description>line 9</description> <type>label</type> + <description>line 9</description> + <id>409</id> + <width>1160</width> <posX>112</posX> <posY>408</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 9</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>509</id> - <description>line 9</description> <type>label</type> + <description>line 9</description> + <id>509</id> + <width>1160</width> <posX>112</posX> <posY>408</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 9</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>410</id> - <description>line 10</description> <type>label</type> + <description>line 10</description> + <id>410</id> + <width>1160</width> <posX>112</posX> <posY>440</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 10</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>510</id> - <description>line 10</description> <type>label</type> + <description>line 10</description> + <id>510</id> + <width>1160</width> <posX>112</posX> <posY>440</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 10</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>411</id> - <description>line 11</description> <type>label</type> + <description>line 11</description> + <id>411</id> + <width>1160</width> <posX>112</posX> <posY>472</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 11</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>511</id> - <description>line 11</description> <type>label</type> + <description>line 11</description> + <id>511</id> + <width>1160</width> <posX>112</posX> <posY>472</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 11</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>412</id> - <description>line 12</description> <type>label</type> + <description>line 12</description> + <id>412</id> + <width>1160</width> <posX>112</posX> <posY>504</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 12</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>512</id> - <description>line 12</description> <type>label</type> + <description>line 12</description> + <id>512</id> + <width>1160</width> <posX>112</posX> <posY>504</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 12</label> + + <textcolor>ffffffff</textcolor> </control> + + <control> - <id>200</id> - <description>line 0</description> <type>label</type> - <colordiffuse>80ffffff</colordiffuse> + <description>line 0</description> + <id>200</id> + <width>1160</width> <posX>112</posX> <posY>120</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> + <colordiffuse>80ffffff</colordiffuse> <label>line 0</label> + + <textcolor>80ffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> <control> - <id>300</id> - <description>line 0</description> <type>label</type> + <description>line 0</description> + <id>300</id> + <width>1160</width> <posX>112</posX> <posY>120</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 0</label> + + <textcolor>ffffffff</textcolor> <disabledcolor>ffffffff</disabledcolor> </control> <control> - <id>201</id> - <description>line 1</description> <type>label</type> + <description>line 1</description> + <id>201</id> + <width>1160</width> <posX>112</posX> <posY>152</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 1</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>301</id> - <description>line 1</description> <type>label</type> + <description>line 1</description> + <id>301</id> + <width>1160</width> <posX>112</posX> <posY>152</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 1</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>202</id> - <description>line 2</description> <type>label</type> + <description>line 2</description> + <id>202</id> + <width>1160</width> <posX>112</posX> <posY>184</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 2</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>302</id> - <description>line 2</description> <type>label</type> + <description>line 2</description> + <id>302</id> + <width>1160</width> <posX>112</posX> <posY>184</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 2</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>203</id> - <description>line 3</description> <type>label</type> + <description>line 3</description> + <id>203</id> + <width>1160</width> <posX>112</posX> <posY>216</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 3</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>303</id> - <description>line 3</description> <type>label</type> + <description>line 3</description> + <id>303</id> + <width>1160</width> <posX>112</posX> <posY>216</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 3</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>204</id> - <description>line 4</description> <type>label</type> + <description>line 4</description> + <id>204</id> + <width>1160</width> <posX>112</posX> <posY>248</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 4</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>304</id> - <description>line 4</description> <type>label</type> + <description>line 4</description> + <id>304</id> + <width>1160</width> <posX>112</posX> <posY>248</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 4</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>205</id> - <description>line 5</description> <type>label</type> + <description>line 5</description> + <id>205</id> + <width>1160</width> <posX>112</posX> <posY>280</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 5</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>305</id> - <description>line 5</description> <type>label</type> + <description>line 5</description> + <id>305</id> + <width>1160</width> <posX>112</posX> <posY>280</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 5</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>206</id> - <description>line 6</description> <type>label</type> + <description>line 6</description> + <id>206</id> + <width>1160</width> <posX>112</posX> <posY>312</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 6</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>306</id> - <description>line 6</description> <type>label</type> + <description>line 6</description> + <id>306</id> + <width>1160</width> <posX>112</posX> <posY>312</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 6</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>207</id> - <description>line 7</description> <type>label</type> + <description>line 7</description> + <id>207</id> + <width>1160</width> <posX>112</posX> <posY>344</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 7</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>307</id> - <description>line 7</description> <type>label</type> + <description>line 7</description> + <id>307</id> + <width>1160</width> <posX>112</posX> <posY>344</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 7</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>208</id> - <description>line 8</description> <type>label</type> + <description>line 8</description> + <id>208</id> + <width>1160</width> <posX>112</posX> <posY>376</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 8</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>308</id> - <description>line 8</description> <type>label</type> + <description>line 8</description> + <id>308</id> + <width>1160</width> <posX>112</posX> <posY>376</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 8</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>209</id> - <description>line 9</description> <type>label</type> + <description>line 9</description> + <id>209</id> + <width>1160</width> <posX>112</posX> <posY>408</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 9</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>309</id> - <description>line 9</description> <type>label</type> + <description>line 9</description> + <id>309</id> + <width>1160</width> <posX>112</posX> <posY>408</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 9</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>210</id> - <description>line 10</description> <type>label</type> + <description>line 10</description> + <id>210</id> + <width>1160</width> <posX>112</posX> <posY>440</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 10</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>310</id> - <description>line 10</description> <type>label</type> + <description>line 10</description> + <id>310</id> + <width>1160</width> <posX>112</posX> <posY>440</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 10</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>211</id> - <description>line 11</description> <type>label</type> + <description>line 11</description> + <id>211</id> + <width>1160</width> <posX>112</posX> <posY>472</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 11</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>311</id> - <description>line 11</description> <type>label</type> + <description>line 11</description> + <id>311</id> + <width>1160</width> <posX>112</posX> <posY>472</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 11</label> + + <textcolor>ffffffff</textcolor> </control> <control> - <id>212</id> - <description>line 12</description> <type>label</type> + <description>line 12</description> + <id>212</id> + <width>1160</width> <posX>112</posX> <posY>504</posY> - <width>1160</width> - <textcolor>80ffffff</textcolor> <label>line 12</label> + + <textcolor>80ffffff</textcolor> </control> <control> - <id>312</id> - <description>line 12</description> <type>label</type> + <description>line 12</description> + <id>312</id> + <width>1160</width> <posX>112</posX> <posY>504</posY> - <width>1160</width> - <textcolor>ffffffff</textcolor> <label>line 12</label> + + <textcolor>ffffffff</textcolor> </control> + + <control> - <id>600</id> - <description>time 0</description> <type>label</type> + <description>time 0</description> + <id>600</id> + <width>100</width> <posX>16</posX> <posY>124</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>601</id> - <description>time 1</description> <type>label</type> + <description>time 1</description> + <id>601</id> + <width>100</width> <posX>16</posX> <posY>156</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>602</id> - <description>time 2</description> <type>label</type> + <description>time 2</description> + <id>602</id> + <width>100</width> <posX>16</posX> <posY>188</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>603</id> - <description>time 3</description> <type>label</type> + <description>time 3</description> + <id>603</id> + <width>100</width> <posX>16</posX> <posY>220</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>604</id> - <description>time 4</description> <type>label</type> + <description>time 4</description> + <id>604</id> + <width>100</width> <posX>16</posX> <posY>252</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>605</id> - <description>time 5</description> <type>label</type> + <description>time 5</description> + <id>605</id> + <width>100</width> <posX>16</posX> <posY>284</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>606</id> - <description>time 6</description> <type>label</type> + <description>time 6</description> + <id>606</id> + <width>100</width> <posX>16</posX> <posY>316</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>607</id> - <description>time 7</description> <type>label</type> + <description>time 7</description> + <id>607</id> + <width>100</width> <posX>16</posX> <posY>348</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>608</id> - <description>time 8</description> <type>label</type> + <description>time 8</description> + <id>608</id> + <width>100</width> <posX>16</posX> <posY>380</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>609</id> - <description>time 9</description> <type>label</type> + <description>time 9</description> + <id>609</id> + <width>100</width> <posX>16</posX> <posY>412</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>610</id> - <description>time 10</description> <type>label</type> + <description>time 10</description> + <id>610</id> + <width>100</width> <posX>16</posX> <posY>444</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>611</id> - <description>time 11</description> <type>label</type> + <description>time 11</description> + <id>611</id> + <width>100</width> <posX>16</posX> <posY>476</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> <control> - <id>612</id> - <description>time 12</description> <type>label</type> + <description>time 12</description> + <id>612</id> + <width>100</width> <posX>16</posX> <posY>508</posY> - <width>100</width> + <label>(xx:xx:xx)</label> <font>font10</font> <textcolor>80ffffff</textcolor> - <label>(xx:xx:xx)</label> </control> - <control> - <description>action menu</description> - <type>actiongroup</type> - <dimColor>00ffffff</dimColor> - <width>367</width> - <height>591</height> - <buttonX>0</buttonX> - <buttonY>0</buttonY> - <buttonwidth>106</buttonwidth> - <buttonheight>720</buttonheight> - <onexit>20</onexit> - <defaultcontrol>950</defaultcontrol> - <textureFocus>Action_focus.png</textureFocus> - <textureNoFocus>Action_nofocus.png</textureNoFocus> - <!--<visible>![Control.HasFocus(20)|Control.HasFocus(21)|Control.HasFocus(1020)|Control.HasFocus(1021)]</visible>--> - <!--<visible>player.playing</visible>--> - <control> - <type>image</type> - <!--<visible>player.playing</visible>--> - <posX>26</posX> - <posY>78</posY> - <width>320</width> - <height>591</height> - <texture>Backslide.png</texture> - <animation effect="Slide" reversible="FALSE" start="-300,0" time="250">Visible</animation> - <animation effect="Slide" end="-300,0" reversible="FALSE" time="250">Hidden</animation> - <colorDiffuse>fffffffff</colorDiffuse> - </control> - <control> - <description>group element</description> - <type>group</type> - <!--<visible>player.playing</visible>--> - <animation effect="Slide" reversible="FALSE" start="-300,0" time="250">Visible</animation> - <animation effect="Slide" end="-300,0" reversible="FALSE" time="250">Hidden</animation> - <control> - <description>group element</description> - <type>group</type> - <!--<visible>!Control.IsVisible(200)</visible>--> - <posX>50</posX> - <posY>121</posY> - <layout>StackLayout</layout> - <animation effect="Slide" reversible="FALSE" start="-300,0" time="250">Visible</animation> - <animation effect="Slide" end="-300,0" reversible="FALSE" time="250">Hidden</animation> - <control> - <id>950</id> - <!--<visible>player.playing</visible>--> - <description>Find LRC</description> - <type>button</type> - <onup>20</onup> - <ondown>951</ondown> - <label>Find LRC</label> - </control> - <control> - <id>951</id> - <!--<visible>!Control.IsVisible(200)</visible>--> - <description>Find lyric</description> - <type>button</type> - <onup>950</onup> - <ondown>952</ondown> - <label>Find lyric</label> - </control> - <control> - <id>952</id> - <!--<visible>!Control.IsVisible(50)</visible>--> - <description>Make LRC</description> - <type>button</type> - <onup>951</onup> - <ondown>953</ondown> - <label>Make LRC</label> - </control> - <control> - <id>953</id> - <!--<visible>!Control.IsVisible(50)</visible>--> - <description>Translate</description> - <type>button</type> - <onup>952</onup> - <ondown>954</ondown> - <label>Translate</label> - </control> - <control> - <id>954</id> - <!--<visible>!Control.IsVisible(50)</visible>--> - <description>LRC pick</description> - <type>button</type> - <onup>953</onup> - <ondown>955</ondown> - <label>Pick LRC</label> - </control> - - <control> - <id>955</id> - <!--<visible>!Control.IsVisible(50)</visible>--> - <description>LRC pick</description> - <type>togglebutton</type> - <onup>954</onup> - <ondown>956</ondown> - <label>Scroll lyric</label> - </control> - - <control> - <id>956</id> - <!--<visible>!Control.IsVisible(50)</visible>--> - <description>Scroll lyric</description> - <type>label</type> - <onup>955</onup> - <ondown>957</ondown> - <label></label> - </control> - - <control> - <description>Current Playlist</description> - <type>button</type> - <id>957</id> - <label>4555</label> - <onup>956</onup> - <ondown>958</ondown> - <hyperlink>500</hyperlink> - </control> - <control> - <description>Now playing</description> - <type>button</type> - <id>958</id> - <label>4540</label> - <onup>957</onup> - <ondown>20</ondown> - <hyperlink>510</hyperlink> - </control> - </control> - </control> - </control> - - <control> - <id>50</id> - <visible>yes</visible> - <description>Find LRC</description> - <type>button</type> - <onleft>950</onleft> - <onright>950</onright> - <posX>800</posX> - <posY>525</posY> - <label>Tag</label> - <width>75</width> - </control> </controls> </window> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Sil...@us...> - 2010-07-28 14:15:27
|
Revision: 3671 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3671&view=rev Author: SilentException Date: 2010-07-28 14:15:20 +0000 (Wed, 28 Jul 2010) Log Message: ----------- * Replaced obsolete FreeResource calls with Dispose * Fixed warnings * Improved LRC edit when LRC is available (user can edit existing LRC if he wishes to - will be asked) * Improved LRC/Lyrics modes switch (user can now search for Lyrics even when LRC is available) * Added <define>#MyLyrics.EnableMouseControl:yes</define> to enable mouse movement on the window (was disabled before), default stays as is (no mouse) * Small user notification string fixes * Few exceptions caught and dealt with * Bumped assembly versions to 1.5.1 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -26,7 +26,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.5.0.0")] +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -50,7 +50,7 @@ private string latestTitleBeforeCrash = null; private LyricsController lc = null; - private string log; + //private string log; private string logFileName = "MyLyrics_Batch.log"; private string logFullFileName = ""; private Queue lyricConfigInfosQueue; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -65,7 +65,7 @@ private string _guidString; private Timer _ImageChangeTimer; private string _LastFileName = ""; - private string _LastLyricText = ""; + //private string _LastLyricText = ""; private string _LastStreamFile = string.Empty; private LyricsController _lc; internal string _logName = "MyLyrics.log"; @@ -281,7 +281,7 @@ _TrackText = ""; _LyricText = ""; _ImagePathContainer.Clear(); - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); resetLrcFields(); resetGUI(_selectedScreen); @@ -387,7 +387,7 @@ else if ((_artist.Length == 0 && _title.Length > 0) || (_title.Length == 0 && _artist.Length > 0)) { //_ImagePathContainer.Clear(); - //GUIelement_ImgCoverArt.FreeResources(); + //GUIelement_ImgCoverArt.Dispose(); resetLrcFields(); resetGUI(_selectedScreen); @@ -402,7 +402,7 @@ _TrackText = ""; _LyricText = ""; _ImagePathContainer.Clear(); - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); resetLrcFields(); @@ -449,7 +449,7 @@ else if ((_artist.Length == 0 && _title.Length > 0) || (_title.Length == 0 && _artist.Length > 0)) { //_ImagePathContainer.Clear(); - //GUIelement_ImgCoverArt.FreeResources(); + //GUIelement_ImgCoverArt.Dispose(); resetLrcFields(); resetGUI(_selectedScreen); @@ -464,7 +464,7 @@ _TrackText = ""; _LyricText = ""; _ImagePathContainer.Clear(); - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); resetGUI(_selectedScreen); @@ -490,7 +490,42 @@ base.Process(); } + private bool CheckReallyEditLRCBeforeEdit() { + SimpleLRC lrc = new SimpleLRC(_artist, _title, _LyricText); + if (lrc.IsValid) + { + GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO); + if (dlgYesNo != null) + { + dlgYesNo.Reset(); + + dlgYesNo.SetHeading("Edit existing LRC?"); + + dlgYesNo.SetLine(1, "This song already has a valid LRC lyric."); + dlgYesNo.SetLine(2, "Do you really want to edit it?"); + + dlgYesNo.DoModal(GetID); + + if (dlgYesNo.IsConfirmed) + { + _LyricText = lrc.LyricAsPlainLyric; + return true; + } + else + { + return false; + } + + } + //_alreadyValidLRC = true; + //_lines = new string[1] { "This song already has a valid LRC lyric" }; + //_StatusText = "This song already has a valid LRC lyric"; + //GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _lines[0]); + } + return true; + } + private void ShowLRCtoEdit() { GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); @@ -499,20 +534,8 @@ { _LyricText = _LyricText.Trim(); - SimpleLRC lrc = new SimpleLRC(_artist, _title, _LyricText); - - if (lrc.IsValid) + //else { - _alreadyValidLRC = true; - _lines = new string[1] { "This song already has a valid LRC lyric" }; - _StatusText = "This song already has a valid LRC lyric"; - - //GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, _lines[0]); - //GUIControl.SetControlLabel(GetID, (int) GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, _lines[0]); - GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, _lines[0]); - } - else - { resetLrcFields(); _lines = _LyricText.Split(new string[2] { "\r\n", "\n" }, StringSplitOptions.None); @@ -590,6 +613,19 @@ return table; } + private bool enableMouseControl() { + string enableMouseControl = String.Empty; + if (defines != null && defines.Contains("#MyLyrics.EnableMouseControl")) + enableMouseControl = (string)defines["#MyLyrics.EnableMouseControl"]; + try { + if (enableMouseControl.ToUpper() == "TRUE" || enableMouseControl.ToUpper() == "YES") + return true; + } + catch { + } + return false; + } + private bool useEditControlsOnLRCPick() { string useEditControlsOnLRCPick = String.Empty; @@ -893,11 +929,16 @@ public override void OnAction(Action action) { - if (action.wID == Action.ActionType.ACTION_MOUSE_MOVE) + if (!enableMouseControl()) { - return; + if (action.wID == Action.ActionType.ACTION_MOUSE_MOVE) + { + return; + } } + base.OnAction(action); + switch (action.wID) { case Action.ActionType.ACTION_PREVIOUS_MENU: @@ -955,17 +996,20 @@ else if (action.m_key.KeyChar.Equals(48) || action.m_key.KeyChar.Equals(101)) // '0' or 'E' { // Don't use a stream to create a LRC - if (g_Player.IsRadio) + if (g_Player.IsRadio || String.IsNullOrEmpty(_artist)) { - return; + break; } _lyricsFound = false; if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); - ShowLRCtoEdit(); - Process(); + if (CheckReallyEditLRCBeforeEdit()) + { + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + ShowLRCtoEdit(); + Process(); + } } else { @@ -1056,8 +1100,8 @@ _SearchType = (int) SEARCH_TYPES.ONLY_LRCS; } - if (hasValidLRC && _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) - _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; + //if (hasValidLRC && _SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) + // _SearchType = (int)SEARCH_TYPES.ONLY_LRCS; if (_SearchType != (int)SEARCH_TYPES.ONLY_LYRICS && !_useLrcFinder) { @@ -1065,9 +1109,9 @@ GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg2.SetHeading("LRC screen disabled"); - dlg2.SetLine(1, "You have not enabled LRCFinder"); - dlg2.SetLine(2, "in configuration and have thereby"); - dlg2.SetLine(3, "disabled the LRC screen."); + dlg2.SetLine(1, "You haven't enabled LRCFinder"); + dlg2.SetLine(2, "in configuration."); + dlg2.SetLine(3, "LRC screen is disabled!"); dlg2.DoModal(GUIWindowManager.ActiveWindow); return; @@ -1143,7 +1187,6 @@ break; } } - base.OnAction(action); } private void ShowLrcPick() @@ -1291,9 +1334,9 @@ { GUIDialogOK dlg2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg2.SetHeading("LRC screen disabled"); - dlg2.SetLine(1, "You have not enabled LRCFinder"); - dlg2.SetLine(2, "in configuration and have thereby"); - dlg2.SetLine(3, "disabled the LRC screen."); + dlg2.SetLine(1, "You haven't enabled LRCFinder"); + dlg2.SetLine(2, "in configuration."); + dlg2.SetLine(3, "LRC screen is disabled!"); dlg2.DoModal(GUIWindowManager.ActiveWindow); } break; @@ -1319,21 +1362,22 @@ dlg2.DoModal(GUIWindowManager.ActiveWindow); return; } + if (String.IsNullOrEmpty(_artist)) + break; - GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); + //GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric_Scroll); //CONTROL_LYRIC_SELECTED = (int) GUI_Lyrics_Controls.CONTROL_Lyric; //_lyricsFound = false; if (_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { - resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + if (CheckReallyEditLRCBeforeEdit()) + { + resetGUI((int)MyLyricsSettings.Screen.LRC_EDITOR); + ShowLRCtoEdit(); + Process(); + } } - - //_newTrack = true; - - ShowLRCtoEdit(); - - Process(); break; @@ -1393,12 +1437,12 @@ { translate = new TranslateProvider.TranslateProvider("www.team-mediaportal.com/MyLyrics"); } - catch (FileNotFoundException ex) + catch (FileNotFoundException) { GUIDialogOK dlg3 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); dlg3.SetHeading("File not found"); dlg3.SetLine(1, "The TranslateProvider.dll assembly"); - dlg3.SetLine(2, "could not be found."); + dlg3.SetLine(2, "could not be located!"); dlg3.SetLine(3, String.Empty); dlg3.DoModal(GUIWindowManager.ActiveWindow); } @@ -1409,8 +1453,22 @@ lyricToTranslate = lyricToTranslate.Replace("\n", "\n "); - string translation = translate.Translate(lyricToTranslate, _translationLanguageCode, - out detectedLanguage, out reliable, out confidence, "\n"); + string translation = string.Empty; + try + { + translation = translate.Translate(lyricToTranslate, _translationLanguageCode, + out detectedLanguage, out reliable, out confidence, "\n"); + } + catch + { + GUIDialogOK dlg3 = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK); + dlg3.SetHeading("Error"); + dlg3.SetLine(1, "Error occured while trying to translate!"); + dlg3.SetLine(2, String.Empty); + dlg3.SetLine(3, String.Empty); + dlg3.DoModal(GUIWindowManager.ActiveWindow); + return; + } translation = translation.Replace("\n ", "\n"); @@ -1453,7 +1511,7 @@ _TrackText = ""; _LyricText = ""; _ImagePathContainer.Clear(); - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); resetGUI(_selectedScreen); @@ -1660,7 +1718,7 @@ if (_AutomaticReadFromMusicTag && g_Player.IsRadio == false && _CurrentTrackTag != null && _CurrentTrackTag.Lyrics.Length != 0 && - !((!_useLrcFinder && + !((/*!_useLrcFinder &&*/ new SimpleLRC(_artist, _title, _CurrentTrackTag.Lyrics).IsValid))) { string lyric = LyricUtil.FixLyrics(_CurrentTrackTag.Lyrics); @@ -1675,8 +1733,7 @@ #region 5) Lyric in music database if (lyricText.Length != 0 && - !((!_useLrcFinder && _CurrentTrackTag != null && - new SimpleLRC(_artist, _title, lyricText).IsValid))) + !((/*!_useLrcFinder && */ new SimpleLRC(_artist, _title, lyricText).IsValid))) { LyricFound = new Object[] { lyricText, _artist, _title, "lyrics database" }; return true; @@ -1726,7 +1783,7 @@ { _TrackText = ""; _ImagePathContainer.Clear(); - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); resetGUI(_selectedScreen); resetLrcFields(); @@ -1911,16 +1968,18 @@ } else if (_alwaysAskUploadLrcToLrcFinder || !_confirmedNoUploadLrcToLrcFinder) { - GUIDialogYesNo dlgYesNo = - (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO); + GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO); if (dlgYesNo != null) { + dlgYesNo.Reset(); + dlgYesNo.SetHeading("Upload to LRCFinder?"); - dlgYesNo.SetLine(1, string.Empty); - dlgYesNo.SetLine(2, "Upload this and future created"); - dlgYesNo.SetLine(3, "LRC files to LrcFinder?"); + dlgYesNo.SetLine(1, "Upload this and future created"); + dlgYesNo.SetLine(2, "LRC files to LrcFinder?"); + dlgYesNo.DoModal(GetID); + if (dlgYesNo.IsConfirmed) { UploadLrcFile(_LyricText); @@ -2409,7 +2468,6 @@ GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGPICKBUTTON); //GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS); - for (int i = 0; i < _TAG_IN_ROUND; i++) { GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); @@ -2468,7 +2526,7 @@ for (int i = 0; i < _TAG_IN_ROUND; i++) { - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); //GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); @@ -2479,6 +2537,21 @@ GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } + if (string.IsNullOrEmpty(_artist)) { + for (int i = 0; i < _TAG_IN_ROUND; i++) { + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); + } + resetGUI((int)MyLyricsSettings.Screen.LYRICS); + } + for (int i = 0; i < 5; i++) { GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_MINI_VIEW_LINE + i); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -72,7 +72,7 @@ { if (_ImagePathContainer.Count > 0) { - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); if (_ImagePathContainer.Count > 1) { int currentImage = 0; @@ -99,6 +99,14 @@ private void GetTrackTags() { + if (!g_Player.Playing) + { + _PreviousTrackTag = null; + _CurrentTrackTag = null; + _NextTrackTag = null; + return; + } + bool isCurSongCdTrack = IsCdTrack(_CurrentTrackFileName); bool isNextSongCdTrack = IsCdTrack(_NextTrackFileName); bool isInternetStream = Utils.IsAVStream(_CurrentTrackFileName); @@ -273,13 +281,13 @@ { try { - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); GUIelement_ImgCoverArt.SetFileName(GUIGraphicsContext.Skin + @"\media\missing_coverart.png"); GUIelement_ImgCoverArt.AllocResources(); } catch (Exception ex) { - GUIelement_ImgCoverArt.FreeResources(); + GUIelement_ImgCoverArt.Dispose(); Log.Debug("GUIMusicPlayingNow: could not set default image - {0}", ex.Message); } } Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -34,5 +34,5 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.5.0.0")] -[assembly: AssemblyFileVersion("1.5.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] \ No newline at end of file Modified: trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2010-07-28 11:05:31 UTC (rev 3670) +++ trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2010-07-28 14:15:20 UTC (rev 3671) @@ -35,5 +35,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.1.0")] +[assembly: AssemblyFileVersion("1.5.1.0")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2010-08-04 19:24:57
|
Revision: 3701 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3701&view=rev Author: saamand Date: 2010-08-04 19:24:50 +0000 (Wed, 04 Aug 2010) Log Message: ----------- - Lyricspluginsite.com is no longer suited for parsing and invalid lyric is returned. The support for the site has been removed. Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 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/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.resx trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -203,7 +203,7 @@ lyric = lyricTemp.ToString().Trim(); - if (lyric.Length == 0) + if (lyric.Length == 0 || lyric.Contains("www.lyricsvip.com")) { lyric = "Not found"; } Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -5,7 +5,7 @@ { public static class Setup { - public static string[] BatchSearchSites = new string[8] + public static string[] BatchSearchSites = new string[7] { "LrcFinder", "LyricWiki", @@ -13,8 +13,7 @@ "LyricsOnDemand", "HotLyrics", "Actionext", - "LyrDB", - "LyricsPluginSite" + "LyrDB" }; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -50,7 +50,6 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btClose = new System.Windows.Forms.Button(); this.btUpdate = new System.Windows.Forms.Button(); this.gbSearchInfo.SuspendLayout(); @@ -196,7 +195,6 @@ this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); this.gbLyricSites.Controls.Add(this.cbLyricWiki); - this.gbLyricSites.Controls.Add(this.cbLyricsPluginSite); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(9, 115); this.gbLyricSites.Name = "gbLyricSites"; @@ -211,7 +209,7 @@ this.cbLrcFinder.Checked = true; this.cbLrcFinder.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLrcFinder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLrcFinder.Location = new System.Drawing.Point(338, 21); + this.cbLrcFinder.Location = new System.Drawing.Point(237, 19); this.cbLrcFinder.Name = "cbLrcFinder"; this.cbLrcFinder.Size = new System.Drawing.Size(68, 17); this.cbLrcFinder.TabIndex = 19; @@ -224,7 +222,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(338, 44); + this.cbLyrDB.Location = new System.Drawing.Point(237, 44); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 18; @@ -237,7 +235,7 @@ 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, 44); + this.cbActionext.Location = new System.Drawing.Point(18, 44); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 17; @@ -250,7 +248,7 @@ this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(237, 44); + this.cbHotLyrics.Location = new System.Drawing.Point(132, 44); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 14; @@ -276,7 +274,7 @@ this.cbLyrics007.Checked = true; this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(237, 21); + this.cbLyrics007.Location = new System.Drawing.Point(131, 19); this.cbLyrics007.Name = "cbLyrics007"; this.cbLyrics007.Size = new System.Drawing.Size(72, 17); this.cbLyrics007.TabIndex = 13; @@ -289,26 +287,13 @@ this.cbLyricWiki.Checked = true; this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(18, 44); + this.cbLyricWiki.Location = new System.Drawing.Point(338, 21); this.cbLyricWiki.Name = "cbLyricWiki"; this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); this.cbLyricWiki.TabIndex = 11; this.cbLyricWiki.Text = "LyricWiki"; this.cbLyricWiki.UseVisualStyleBackColor = true; // - // cbLyricsPluginSite - // - this.cbLyricsPluginSite.AutoSize = true; - this.cbLyricsPluginSite.Checked = true; - this.cbLyricsPluginSite.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLyricsPluginSite.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricsPluginSite.Location = new System.Drawing.Point(131, 21); - this.cbLyricsPluginSite.Name = "cbLyricsPluginSite"; - this.cbLyricsPluginSite.Size = new System.Drawing.Size(80, 17); - this.cbLyricsPluginSite.TabIndex = 15; - this.cbLyricsPluginSite.Text = "LyricsPlugin"; - this.cbLyricsPluginSite.UseVisualStyleBackColor = true; - // // btClose // this.btClose.Location = new System.Drawing.Point(361, 546); @@ -334,7 +319,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(448, 575); + this.ClientSize = new System.Drawing.Size(448, 573); this.ControlBox = false; this.Controls.Add(this.btUpdate); this.Controls.Add(this.btClose); @@ -376,7 +361,6 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; private System.Windows.Forms.ListView lvSearchResults; private System.Windows.Forms.ColumnHeader cbSite; private System.Windows.Forms.ColumnHeader cbResult; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -110,11 +110,6 @@ "True") ? true : false; - cbLyricsPluginSite.Checked = - ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals( - "True") - ? true - : false; cbHotLyrics.Checked = ((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true @@ -210,10 +205,6 @@ { sitesToSearch.Add("LyricsOnDemand"); } - if (cbLyricsPluginSite.Checked) - { - sitesToSearch.Add("LyricsPluginSite"); - } // If automaticUpdate is set then return after the first positive search m_EventStopThread = new ManualResetEvent(false); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -534,10 +534,6 @@ sitesToSearch.Add("LyricsOnDemand"); if (((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True")) sitesToSearch.Add("HotLyrics"); - if ( - ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals( - "True")) - sitesToSearch.Add("LyricsPluginSite"); m_find = xmlreader.GetValueAsString("myLyrics", "find", ""); m_replace = xmlreader.GetValueAsString("myLyrics", "replace", ""); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -107,7 +107,6 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.trackBar = new System.Windows.Forms.TrackBar(); @@ -158,7 +157,7 @@ this.tabControl.Location = new System.Drawing.Point(0, 0); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(558, 539); + this.tabControl.Size = new System.Drawing.Size(558, 536); this.tabControl.TabIndex = 1; this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); // @@ -167,7 +166,7 @@ this.tabPageLyricsDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageLyricsDatabase.Name = "tabPageLyricsDatabase"; this.tabPageLyricsDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLyricsDatabase.Size = new System.Drawing.Size(550, 513); + this.tabPageLyricsDatabase.Size = new System.Drawing.Size(550, 510); this.tabPageLyricsDatabase.TabIndex = 1; this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; @@ -625,7 +624,7 @@ this.tabPageSetup.Location = new System.Drawing.Point(4, 22); this.tabPageSetup.Name = "tabPageSetup"; this.tabPageSetup.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSetup.Size = new System.Drawing.Size(550, 513); + this.tabPageSetup.Size = new System.Drawing.Size(550, 510); this.tabPageSetup.TabIndex = 2; this.tabPageSetup.Text = "Settings"; this.tabPageSetup.UseVisualStyleBackColor = true; @@ -783,7 +782,7 @@ this.cbMusicTagAlwaysCheck.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.cbMusicTagAlwaysCheck.Location = new System.Drawing.Point(17, 20); this.cbMusicTagAlwaysCheck.Name = "cbMusicTagAlwaysCheck"; - this.cbMusicTagAlwaysCheck.Size = new System.Drawing.Size(216, 17); + this.cbMusicTagAlwaysCheck.Size = new System.Drawing.Size(223, 17); this.cbMusicTagAlwaysCheck.TabIndex = 7; this.cbMusicTagAlwaysCheck.Text = "Always use plain lyric from tag (if available)"; this.cbMusicTagAlwaysCheck.UseVisualStyleBackColor = true; @@ -795,7 +794,7 @@ this.cbMusicTagWrite.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.cbMusicTagWrite.Location = new System.Drawing.Point(274, 20); this.cbMusicTagWrite.Name = "cbMusicTagWrite"; - this.cbMusicTagWrite.Size = new System.Drawing.Size(203, 17); + this.cbMusicTagWrite.Size = new System.Drawing.Size(195, 17); this.cbMusicTagWrite.TabIndex = 6; this.cbMusicTagWrite.Text = "Write newly found lyrics to music tag"; this.cbMusicTagWrite.UseVisualStyleBackColor = true; @@ -936,7 +935,6 @@ this.groupBox2.Controls.Add(this.cbLyricsOnDemand); this.groupBox2.Controls.Add(this.cbLyricWiki); this.groupBox2.Controls.Add(this.cbHotLyrics); - this.groupBox2.Controls.Add(this.cbLyricsPluginSite); this.groupBox2.Location = new System.Drawing.Point(229, 48); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(301, 90); @@ -950,7 +948,7 @@ this.cbLrcFinder.Checked = true; this.cbLrcFinder.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLrcFinder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLrcFinder.Location = new System.Drawing.Point(130, 19); + this.cbLrcFinder.Location = new System.Drawing.Point(20, 61); this.cbLrcFinder.Name = "cbLrcFinder"; this.cbLrcFinder.Size = new System.Drawing.Size(68, 17); this.cbLrcFinder.TabIndex = 10; @@ -964,7 +962,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(216, 40); + this.cbLyrDB.Location = new System.Drawing.Point(214, 17); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 9; @@ -978,7 +976,7 @@ 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(216, 19); + this.cbActionext.Location = new System.Drawing.Point(134, 61); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 8; @@ -992,7 +990,7 @@ this.cbLyrics007.Checked = true; this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(20, 61); + this.cbLyrics007.Location = new System.Drawing.Point(20, 40); this.cbLyrics007.Name = "cbLyrics007"; this.cbLyrics007.Size = new System.Drawing.Size(72, 17); this.cbLyrics007.TabIndex = 4; @@ -1020,7 +1018,7 @@ this.cbLyricWiki.Checked = true; this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(130, 40); + this.cbLyricWiki.Location = new System.Drawing.Point(134, 17); this.cbLyricWiki.Name = "cbLyricWiki"; this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); this.cbLyricWiki.TabIndex = 2; @@ -1034,7 +1032,7 @@ this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(130, 61); + this.cbHotLyrics.Location = new System.Drawing.Point(134, 40); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 7; @@ -1042,20 +1040,6 @@ this.cbHotLyrics.UseVisualStyleBackColor = true; this.cbHotLyrics.Leave += new System.EventHandler(this.WriteMediaPortalXML); // - // cbLyricsPluginSite - // - this.cbLyricsPluginSite.AutoSize = true; - this.cbLyricsPluginSite.Checked = true; - this.cbLyricsPluginSite.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLyricsPluginSite.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricsPluginSite.Location = new System.Drawing.Point(20, 40); - this.cbLyricsPluginSite.Name = "cbLyricsPluginSite"; - this.cbLyricsPluginSite.Size = new System.Drawing.Size(80, 17); - this.cbLyricsPluginSite.TabIndex = 9; - this.cbLyricsPluginSite.Text = "LyricsPlugin"; - this.cbLyricsPluginSite.UseVisualStyleBackColor = true; - this.cbLyricsPluginSite.Leave += new System.EventHandler(this.WriteMediaPortalXML); - // // groupBox1 // this.groupBox1.Controls.Add(this.mpLabel2); @@ -1085,7 +1069,7 @@ this.trackBar.Location = new System.Drawing.Point(35, 37); this.trackBar.Maximum = 3; this.trackBar.Name = "trackBar"; - this.trackBar.Size = new System.Drawing.Size(158, 42); + this.trackBar.Size = new System.Drawing.Size(158, 45); this.trackBar.TabIndex = 25; this.trackBar.TickStyle = System.Windows.Forms.TickStyle.Both; this.trackBar.Value = 2; @@ -1214,7 +1198,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(558, 539); + this.ClientSize = new System.Drawing.Size(558, 536); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); @@ -1306,7 +1290,6 @@ private MediaPortal.UserInterface.Controls.MPLabel lbPluginName; private MediaPortal.UserInterface.Controls.MPGroupBox gbLyricSites; internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -225,7 +225,6 @@ cbLyrics007.Checked = xmlreader.GetValue("myLyrics", "useLyrics007").Equals("True"); cbLyricsOnDemand.Checked = xmlreader.GetValue("myLyrics", "useLyricsOnDemand").Equals("True"); cbHotLyrics.Checked = xmlreader.GetValue("myLyrics", "useHotLyrics").Equals("True"); - cbLyricsPluginSite.Checked = xmlreader.GetValue("myLyrics", "useLyricsPluginSite").Equals("True"); } else { @@ -500,8 +499,6 @@ sitesToSearch.Add("LyricsOnDemand"); if (cbHotLyrics.Checked) sitesToSearch.Add("HotLyrics"); - if (cbLyricsPluginSite.Checked) - sitesToSearch.Add("LyricsPluginSite"); if (sitesToSearch.Count == 0) { @@ -1085,8 +1082,7 @@ if (trackBar.Value == 0) { cbLyricsOnDemand.Checked = true; - cbLyricsPluginSite.Checked = false; - cbLyrics007.Checked = false; + cbLyrics007.Checked = true; cbLrcFinder.Checked = false; cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; @@ -1097,8 +1093,7 @@ { cbLyricsOnDemand.Checked = true; cbLyrics007.Checked = true; - cbLyricsPluginSite.Checked = true; - cbLrcFinder.Checked = false; + cbLrcFinder.Checked = true; cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; cbActionext.Checked = false; @@ -1107,7 +1102,6 @@ else if (trackBar.Value == 2) { cbLyricsOnDemand.Checked = true; - cbLyricsPluginSite.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; cbLyricWiki.Checked = true; @@ -1124,7 +1118,6 @@ cbHotLyrics.Checked = true; cbLyrDB.Checked = true; cbActionext.Checked = true; - cbLyricsPluginSite.Checked = true; } if (sender != null) @@ -1142,7 +1135,6 @@ cbLrcFinder.Checked = true; cbLyricWiki.Checked = true; cbHotLyrics.Checked = true; - cbLyricsPluginSite.Checked = true; trackBar.Value = 2; } @@ -1157,7 +1149,6 @@ cbLyrics007.Enabled = false; cbLrcFinder.Enabled = false; cbLyricWiki.Enabled = false; - cbLyricsPluginSite.Enabled = false; cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; @@ -1176,7 +1167,6 @@ cbLyrics007.Enabled = true; cbLrcFinder.Enabled = true; cbLyricWiki.Enabled = true; - cbLyricsPluginSite.Enabled = true; cbHotLyrics.Enabled = true; cbActionext.Enabled = true; cbLyrDB.Enabled = true; @@ -1192,7 +1182,6 @@ cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; - cbLyricsPluginSite.Enabled = false; cbLyricsOnDemand.Checked = false; cbLyrics007.Checked = false; @@ -1201,7 +1190,6 @@ cbHotLyrics.Checked = false; cbActionext.Checked = false; cbLyrDB.Checked = false; - cbLyricsPluginSite.Checked = false; cbMusicTagAlwaysCheck.Checked = false; cbMusicTagWrite.Checked = true; @@ -1241,7 +1229,6 @@ xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricsOnDemand", cbLyricsOnDemand.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useHotLyrics", cbHotLyrics.Checked.ToString()); - xmlwriter.SetValue("myLyrics", "useLyricsPluginSite", cbLyricsPluginSite.Checked.ToString()); xmlwriter.SetValueAsBool("myLyrics", "useAutoscroll", cbUseAutoScrollAsDefault.Checked); xmlwriter.SetValueAsBool("myLyrics", "uploadLrcToLrcFinder", cbUploadLrcAutomatically.Checked); xmlwriter.SetValueAsBool("myLyrics", "alwaysAskUploadLrcToLrcFinder", cbAlwaysAskForUploadToLrcFinder.Checked); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-08-04 19:24:50 UTC (rev 3701) @@ -123,6 +123,12 @@ <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="Find.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="bgWorkerSearch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>6, 4</value> </metadata> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-08-03 19:55:50 UTC (rev 3700) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-08-04 19:24:50 UTC (rev 3701) @@ -98,8 +98,7 @@ private bool _useLyrDB; private bool _useLyrics007, - _useLyricsOnDemand, - _useLyricsPluginSite; + _useLyricsOnDemand; private bool _useLyricWiki; @@ -686,10 +685,6 @@ : false; _useLyricsOnDemand = (xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).Equals("True") ? true : false; - _useLyricsPluginSite = - (xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).Equals("True") - ? true - : false; _useHotLyrics = (xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).Equals("True") ? true : false; @@ -805,10 +800,6 @@ { sitesToSearch.Add("HotLyrics"); } - if (_useLyricsPluginSite && Setup.IsMember("LyricsPluginSite")) - { - sitesToSearch.Add("LyricsPluginSite"); - } _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2010-08-13 16:27:17
|
Revision: 3720 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3720&view=rev Author: saamand Date: 2010-08-13 16:27:09 +0000 (Fri, 13 Aug 2010) Log Message: ----------- - LyricsPluginSite fixed and reenabled by yoavain Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsWebClient.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 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/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.resx trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -10,10 +10,13 @@ { internal class LyricsPluginSite { + private bool firstStepComplete; private bool complete; private string lyric = ""; private int timeLimit; private Timer timer; + private string timestamp; + private string checkCode; public LyricsPluginSite(string artist, string title, ManualResetEvent m_EventStop_SiteSearches, int timeLimit) { @@ -31,18 +34,44 @@ artist = fixHebrew(artist); title = fixHebrew(title); - string urlString = "http://www.lyricsplugin.com/winamp03/plugin/?" + "artist=" + artist + "&title=" + title; - + // timer 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); + // 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)) @@ -61,103 +90,81 @@ get { return lyric; } } - private static string fixEscapeCharacters(string text) + private void firstCallbackMethod(object sender, OpenReadCompletedEventArgs e) { - text = text.Replace("(", ""); - text = text.Replace(")", ""); - text = text.Replace("#", ""); - text = text.Replace("/", ""); + bool thisMayBeTheCorrectPage = true; + StringBuilder lyricsCommand = new StringBuilder(); - text = text.Replace("%", "%25"); + LyricsWebClient client = (LyricsWebClient) sender; + Stream reply = null; + StreamReader sr = null; - text = text.Replace(" ", "%20"); - text = text.Replace("$", "%24"); - text = text.Replace("&", "%26"); - text = text.Replace("+", "%2B"); - text = text.Replace(",", "%2C"); - text = text.Replace(":", "%3A"); - text = text.Replace(";", "%3B"); - text = text.Replace("=", "%3D"); - text = text.Replace("?", "%3F"); - text = text.Replace("@", "%40"); - text = text.Replace("&", "&"); + try + { + reply = (Stream) e.Result; + sr = new StreamReader(reply, Encoding.UTF8); - return text; - } + string line = ""; + int noOfLinesCount = 0; - private static string fixHebrew(string text) - { - text = text.Replace("\uC3A0", "%d7%90"); // \xE0 - text = text.Replace("\uC3A1", "%D7%91"); - text = text.Replace("\uC3A2", "%D7%92"); - text = text.Replace("\uC3A3", "%D7%93"); - text = text.Replace("\uC3A4", "%D7%94"); - text = text.Replace("\uC3A5", "%D7%95"); - text = text.Replace("\uC3A6", "%D7%96"); - text = text.Replace("\uC3A7", "%D7%97"); - text = text.Replace("\uC3A8", "%D7%98"); - text = text.Replace("\uC3A9", "%D7%99"); - text = text.Replace("\uC3AA", "%D7%9A"); - text = text.Replace("\uC3AB", "%D7%9B"); - text = text.Replace("\uC3AC", "%D7%9C"); - text = text.Replace("\uC3AD", "%D7%9D"); - text = text.Replace("\uC3AE", "%D7%9E"); - text = text.Replace("\uC3AF", "%D7%9F"); - text = text.Replace("\uC3B0", "%D7%A0"); - text = text.Replace("\uC3B1", "%D7%A1"); - text = text.Replace("\uC3B2", "%D7%A2"); - text = text.Replace("\uC3B3", "%D7%A3"); - text = text.Replace("\uC3B4", "%D7%A4"); - text = text.Replace("\uC3B5", "%D7%A5"); - text = text.Replace("\uC3B6", "%D7%A6"); - text = text.Replace("\uC3B7", "%D7%A7"); - text = text.Replace("\uC3B8", "%D7%A8"); - text = text.Replace("\uC3B9", "%D7%A9"); - text = text.Replace("\uC3BA", "%D7%AA"); // \xFA + while (line.IndexOf(@"getContent(") == -1) + { + if (sr.EndOfStream || ++noOfLinesCount > 300) + { + thisMayBeTheCorrectPage = false; + break; + } + else + { + line = sr.ReadLine(); + } + } - text = text.Replace("\uD790", "%d7%90"); // \xE0 - text = text.Replace("\uD791", "%D7%91"); - text = text.Replace("\uD792", "%D7%92"); - text = text.Replace("\uD793", "%D7%93"); - text = text.Replace("\uD794", "%D7%94"); - text = text.Replace("\uD795", "%D7%95"); - text = text.Replace("\uD796", "%D7%96"); - text = text.Replace("\uD797", "%D7%97"); - text = text.Replace("\uD798", "%D7%98"); - text = text.Replace("\uD799", "%D7%99"); - text = text.Replace("\uD79A", "%D7%9A"); - text = text.Replace("\uD79B", "%D7%9B"); - text = text.Replace("\uD79C", "%D7%9C"); - text = text.Replace("\uD79D", "%D7%9D"); - text = text.Replace("\uD79E", "%D7%9E"); - text = text.Replace("\uD79F", "%D7%9F"); - text = text.Replace("\uD7A0", "%D7%A0"); - text = text.Replace("\uD7A1", "%D7%A1"); - text = text.Replace("\uD7A2", "%D7%A2"); - text = text.Replace("\uD7A3", "%D7%A3"); - text = text.Replace("\uD7A4", "%D7%A4"); - text = text.Replace("\uD7A5", "%D7%A5"); - text = text.Replace("\uD7A6", "%D7%A6"); - text = text.Replace("\uD7A7", "%D7%A7"); - text = text.Replace("\uD7A8", "%D7%A8"); - text = text.Replace("\uD7A9", "%D7%A9"); - text = text.Replace("\uD7AA", "%D7%AA"); // \xFA + if (thisMayBeTheCorrectPage) + { + lyricsCommand.Append(line); - return text; + string[] parameters = line.Split('\''); + + // todo - Find a better check here + if (parameters.Length == 9) + { + timestamp = parameters[5]; + checkCode = parameters[7]; + } + } + } + catch + { + lyric = "Not found"; + } + finally + { + if (sr != null) + { + sr.Close(); + } + + if (reply != null) + { + reply.Close(); + } + firstStepComplete = true; + } } - private void callbackMethod(object sender, OpenReadCompletedEventArgs e) + private void secondCallbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; StringBuilder lyricTemp = 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 = ""; @@ -197,13 +204,10 @@ } } - lyricTemp.Replace("<br>", Environment.NewLine); - lyricTemp.Replace("<br />", Environment.NewLine); - lyricTemp.Replace(""", "\""); + // Clean lyrics + lyric = cleanLyrics(lyricTemp); - lyric = lyricTemp.ToString().Trim(); - - if (lyric.Length == 0 || lyric.Contains("www.lyricsvip.com")) + if (lyric.Length == 0) { lyric = "Not found"; } @@ -228,6 +232,15 @@ } } + private string cleanLyrics(StringBuilder lyricTemp) + { + lyricTemp.Replace("<br>", Environment.NewLine); + lyricTemp.Replace("<br />", Environment.NewLine); + lyricTemp.Replace(""", "\""); + + return lyricTemp.ToString().Trim(); + } + private void timer_Elapsed(object sender, ElapsedEventArgs e) { timer.Stop(); @@ -238,5 +251,90 @@ complete = true; Thread.CurrentThread.Abort(); } + + private static string fixEscapeCharacters(string text) + { + text = text.Replace("(", ""); + text = text.Replace(")", ""); + text = text.Replace("#", ""); + text = text.Replace("/", ""); + + text = text.Replace("%", "%25"); + + text = text.Replace(" ", "%20"); + text = text.Replace("$", "%24"); + text = text.Replace("&", "%26"); + text = text.Replace("+", "%2B"); + text = text.Replace(",", "%2C"); + text = text.Replace(":", "%3A"); + text = text.Replace(";", "%3B"); + text = text.Replace("=", "%3D"); + text = text.Replace("?", "%3F"); + text = text.Replace("@", "%40"); + text = text.Replace("&", "&"); + + return text; + } + + private static string fixHebrew(string text) + { + text = text.Replace("\uC3A0", "%d7%90"); // \xE0 + text = text.Replace("\uC3A1", "%D7%91"); + text = text.Replace("\uC3A2", "%D7%92"); + text = text.Replace("\uC3A3", "%D7%93"); + text = text.Replace("\uC3A4", "%D7%94"); + text = text.Replace("\uC3A5", "%D7%95"); + text = text.Replace("\uC3A6", "%D7%96"); + text = text.Replace("\uC3A7", "%D7%97"); + text = text.Replace("\uC3A8", "%D7%98"); + text = text.Replace("\uC3A9", "%D7%99"); + text = text.Replace("\uC3AA", "%D7%9A"); + text = text.Replace("\uC3AB", "%D7%9B"); + text = text.Replace("\uC3AC", "%D7%9C"); + text = text.Replace("\uC3AD", "%D7%9D"); + text = text.Replace("\uC3AE", "%D7%9E"); + text = text.Replace("\uC3AF", "%D7%9F"); + text = text.Replace("\uC3B0", "%D7%A0"); + text = text.Replace("\uC3B1", "%D7%A1"); + text = text.Replace("\uC3B2", "%D7%A2"); + text = text.Replace("\uC3B3", "%D7%A3"); + text = text.Replace("\uC3B4", "%D7%A4"); + text = text.Replace("\uC3B5", "%D7%A5"); + text = text.Replace("\uC3B6", "%D7%A6"); + text = text.Replace("\uC3B7", "%D7%A7"); + text = text.Replace("\uC3B8", "%D7%A8"); + text = text.Replace("\uC3B9", "%D7%A9"); + text = text.Replace("\uC3BA", "%D7%AA"); // \xFA + + text = text.Replace("\uD790", "%d7%90"); // \xE0 + text = text.Replace("\uD791", "%D7%91"); + text = text.Replace("\uD792", "%D7%92"); + text = text.Replace("\uD793", "%D7%93"); + text = text.Replace("\uD794", "%D7%94"); + text = text.Replace("\uD795", "%D7%95"); + text = text.Replace("\uD796", "%D7%96"); + text = text.Replace("\uD797", "%D7%97"); + text = text.Replace("\uD798", "%D7%98"); + text = text.Replace("\uD799", "%D7%99"); + text = text.Replace("\uD79A", "%D7%9A"); + text = text.Replace("\uD79B", "%D7%9B"); + text = text.Replace("\uD79C", "%D7%9C"); + text = text.Replace("\uD79D", "%D7%9D"); + text = text.Replace("\uD79E", "%D7%9E"); + text = text.Replace("\uD79F", "%D7%9F"); + text = text.Replace("\uD7A0", "%D7%A0"); + text = text.Replace("\uD7A1", "%D7%A1"); + text = text.Replace("\uD7A2", "%D7%A2"); + text = text.Replace("\uD7A3", "%D7%A3"); + text = text.Replace("\uD7A4", "%D7%A4"); + text = text.Replace("\uD7A5", "%D7%A5"); + text = text.Replace("\uD7A6", "%D7%A6"); + text = text.Replace("\uD7A7", "%D7%A7"); + text = text.Replace("\uD7A8", "%D7%A8"); + text = text.Replace("\uD7A9", "%D7%A9"); + text = text.Replace("\uD7AA", "%D7%AA"); // \xFA + + return text; + } } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsWebClient.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsWebClient.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsWebClient.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -11,6 +11,7 @@ private CookieContainer cookieContainer; private int timeout; private string userAgent; + private string referer; public LyricsWebClient() { @@ -19,6 +20,13 @@ cookieContainer = new CookieContainer(); } + public LyricsWebClient(string referer) + { + timeout = -1; + this.referer = referer; + cookieContainer = new CookieContainer(); + } + public CookieContainer CookieContainer { get { return cookieContainer; } @@ -45,6 +53,11 @@ { ((HttpWebRequest) request).CookieContainer = cookieContainer; ((HttpWebRequest) request).UserAgent = userAgent; + if (referer != null) + { + ((HttpWebRequest)request).Referer = referer; + } + (request).Timeout = timeout; (request).Proxy.Credentials = CredentialCache.DefaultCredentials; } Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -5,7 +5,7 @@ { public static class Setup { - public static string[] BatchSearchSites = new string[7] + public static string[] BatchSearchSites = new string[8] { "LrcFinder", "LyricWiki", @@ -13,7 +13,8 @@ "LyricsOnDemand", "HotLyrics", "Actionext", - "LyrDB" + "LyrDB", + "LyricsPluginSite" }; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -80,7 +80,7 @@ this.lbInfo1.Name = "lbInfo1"; this.lbInfo1.Size = new System.Drawing.Size(197, 18); this.lbInfo1.TabIndex = 3; - this.lbInfo1.Text = "MyLyrics plugin, version 1.5.0.0"; + this.lbInfo1.Text = "MyLyrics plugin, version 1.5.2.0"; // // label2 // Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -50,6 +50,7 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btClose = new System.Windows.Forms.Button(); this.btUpdate = new System.Windows.Forms.Button(); this.gbSearchInfo.SuspendLayout(); @@ -195,6 +196,7 @@ this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); this.gbLyricSites.Controls.Add(this.cbLyricWiki); + this.gbLyricSites.Controls.Add(this.cbLyricsPluginSite); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(9, 115); this.gbLyricSites.Name = "gbLyricSites"; @@ -209,7 +211,7 @@ this.cbLrcFinder.Checked = true; this.cbLrcFinder.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLrcFinder.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLrcFinder.Location = new System.Drawing.Point(237, 19); + this.cbLrcFinder.Location = new System.Drawing.Point(338, 21); this.cbLrcFinder.Name = "cbLrcFinder"; this.cbLrcFinder.Size = new System.Drawing.Size(68, 17); this.cbLrcFinder.TabIndex = 19; @@ -222,7 +224,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(237, 44); + this.cbLyrDB.Location = new System.Drawing.Point(338, 44); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 18; @@ -235,7 +237,7 @@ 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(18, 44); + this.cbActionext.Location = new System.Drawing.Point(131, 44); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 17; @@ -248,7 +250,7 @@ this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(132, 44); + this.cbHotLyrics.Location = new System.Drawing.Point(237, 44); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 14; @@ -274,7 +276,7 @@ this.cbLyrics007.Checked = true; this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(131, 19); + this.cbLyrics007.Location = new System.Drawing.Point(237, 21); this.cbLyrics007.Name = "cbLyrics007"; this.cbLyrics007.Size = new System.Drawing.Size(72, 17); this.cbLyrics007.TabIndex = 13; @@ -287,13 +289,26 @@ this.cbLyricWiki.Checked = true; this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(338, 21); + this.cbLyricWiki.Location = new System.Drawing.Point(18, 44); this.cbLyricWiki.Name = "cbLyricWiki"; this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); this.cbLyricWiki.TabIndex = 11; this.cbLyricWiki.Text = "LyricWiki"; this.cbLyricWiki.UseVisualStyleBackColor = true; // + // cbLyricsPluginSite + // + this.cbLyricsPluginSite.AutoSize = true; + this.cbLyricsPluginSite.Checked = true; + this.cbLyricsPluginSite.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbLyricsPluginSite.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsPluginSite.Location = new System.Drawing.Point(131, 21); + this.cbLyricsPluginSite.Name = "cbLyricsPluginSite"; + this.cbLyricsPluginSite.Size = new System.Drawing.Size(80, 17); + this.cbLyricsPluginSite.TabIndex = 15; + this.cbLyricsPluginSite.Text = "LyricsPlugin"; + this.cbLyricsPluginSite.UseVisualStyleBackColor = true; + // // btClose // this.btClose.Location = new System.Drawing.Point(361, 546); @@ -319,7 +334,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(448, 573); + this.ClientSize = new System.Drawing.Size(448, 575); this.ControlBox = false; this.Controls.Add(this.btUpdate); this.Controls.Add(this.btClose); @@ -361,6 +376,7 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; private System.Windows.Forms.ListView lvSearchResults; private System.Windows.Forms.ColumnHeader cbSite; private System.Windows.Forms.ColumnHeader cbResult; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -110,6 +110,11 @@ "True") ? true : false; + cbLyricsPluginSite.Checked = + ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals( + "True") + ? true + : false; cbHotLyrics.Checked = ((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true @@ -205,6 +210,10 @@ { sitesToSearch.Add("LyricsOnDemand"); } + if (cbLyricsPluginSite.Checked) + { + sitesToSearch.Add("LyricsPluginSite"); + } // If automaticUpdate is set then return after the first positive search m_EventStopThread = new ManualResetEvent(false); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -534,6 +534,10 @@ sitesToSearch.Add("LyricsOnDemand"); if (((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True")) sitesToSearch.Add("HotLyrics"); + if ( + ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals( + "True")) + sitesToSearch.Add("LyricsPluginSite"); m_find = xmlreader.GetValueAsString("myLyrics", "find", ""); m_replace = xmlreader.GetValueAsString("myLyrics", "replace", ""); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -107,6 +107,7 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.trackBar = new System.Windows.Forms.TrackBar(); @@ -935,6 +936,7 @@ this.groupBox2.Controls.Add(this.cbLyricsOnDemand); this.groupBox2.Controls.Add(this.cbLyricWiki); this.groupBox2.Controls.Add(this.cbHotLyrics); + this.groupBox2.Controls.Add(this.cbLyricsPluginSite); this.groupBox2.Location = new System.Drawing.Point(229, 48); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(301, 90); @@ -962,7 +964,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(214, 17); + this.cbLyrDB.Location = new System.Drawing.Point(216, 40); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 9; @@ -976,7 +978,7 @@ 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(134, 61); + this.cbActionext.Location = new System.Drawing.Point(216, 17); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 8; @@ -990,7 +992,7 @@ this.cbLyrics007.Checked = true; this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(20, 40); + this.cbLyrics007.Location = new System.Drawing.Point(130, 17); this.cbLyrics007.Name = "cbLyrics007"; this.cbLyrics007.Size = new System.Drawing.Size(72, 17); this.cbLyrics007.TabIndex = 4; @@ -1018,7 +1020,7 @@ this.cbLyricWiki.Checked = true; this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(134, 17); + this.cbLyricWiki.Location = new System.Drawing.Point(130, 40); this.cbLyricWiki.Name = "cbLyricWiki"; this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); this.cbLyricWiki.TabIndex = 2; @@ -1032,7 +1034,7 @@ this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(134, 40); + this.cbHotLyrics.Location = new System.Drawing.Point(130, 61); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 7; @@ -1040,6 +1042,20 @@ this.cbHotLyrics.UseVisualStyleBackColor = true; this.cbHotLyrics.Leave += new System.EventHandler(this.WriteMediaPortalXML); // + // cbLyricsPluginSite + // + this.cbLyricsPluginSite.AutoSize = true; + this.cbLyricsPluginSite.Checked = true; + this.cbLyricsPluginSite.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbLyricsPluginSite.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsPluginSite.Location = new System.Drawing.Point(20, 40); + this.cbLyricsPluginSite.Name = "cbLyricsPluginSite"; + this.cbLyricsPluginSite.Size = new System.Drawing.Size(80, 17); + this.cbLyricsPluginSite.TabIndex = 9; + this.cbLyricsPluginSite.Text = "LyricsPlugin"; + this.cbLyricsPluginSite.UseVisualStyleBackColor = true; + this.cbLyricsPluginSite.Leave += new System.EventHandler(this.WriteMediaPortalXML); + // // groupBox1 // this.groupBox1.Controls.Add(this.mpLabel2); @@ -1290,6 +1306,7 @@ private MediaPortal.UserInterface.Controls.MPLabel lbPluginName; private MediaPortal.UserInterface.Controls.MPGroupBox gbLyricSites; internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -225,6 +225,7 @@ cbLyrics007.Checked = xmlreader.GetValue("myLyrics", "useLyrics007").Equals("True"); cbLyricsOnDemand.Checked = xmlreader.GetValue("myLyrics", "useLyricsOnDemand").Equals("True"); cbHotLyrics.Checked = xmlreader.GetValue("myLyrics", "useHotLyrics").Equals("True"); + cbLyricsPluginSite.Checked = xmlreader.GetValue("myLyrics", "useLyricsPluginSite").Equals("True"); } else { @@ -499,6 +500,8 @@ sitesToSearch.Add("LyricsOnDemand"); if (cbHotLyrics.Checked) sitesToSearch.Add("HotLyrics"); + if (cbLyricsPluginSite.Checked) + sitesToSearch.Add("LyricsPluginSite"); if (sitesToSearch.Count == 0) { @@ -1082,7 +1085,8 @@ if (trackBar.Value == 0) { cbLyricsOnDemand.Checked = true; - cbLyrics007.Checked = true; + cbLyricsPluginSite.Checked = true; + cbLyrics007.Checked = false; cbLrcFinder.Checked = false; cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; @@ -1092,8 +1096,9 @@ else if (trackBar.Value == 1) { cbLyricsOnDemand.Checked = true; + cbLyricsPluginSite.Checked = true; + cbLrcFinder.Checked = true; cbLyrics007.Checked = true; - cbLrcFinder.Checked = true; cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; cbActionext.Checked = false; @@ -1102,6 +1107,7 @@ else if (trackBar.Value == 2) { cbLyricsOnDemand.Checked = true; + cbLyricsPluginSite.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; cbLyricWiki.Checked = true; @@ -1118,6 +1124,7 @@ cbHotLyrics.Checked = true; cbLyrDB.Checked = true; cbActionext.Checked = true; + cbLyricsPluginSite.Checked = true; } if (sender != null) @@ -1135,6 +1142,7 @@ cbLrcFinder.Checked = true; cbLyricWiki.Checked = true; cbHotLyrics.Checked = true; + cbLyricsPluginSite.Checked = true; trackBar.Value = 2; } @@ -1149,6 +1157,7 @@ cbLyrics007.Enabled = false; cbLrcFinder.Enabled = false; cbLyricWiki.Enabled = false; + cbLyricsPluginSite.Enabled = false; cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; @@ -1167,6 +1176,7 @@ cbLyrics007.Enabled = true; cbLrcFinder.Enabled = true; cbLyricWiki.Enabled = true; + cbLyricsPluginSite.Enabled = true; cbHotLyrics.Enabled = true; cbActionext.Enabled = true; cbLyrDB.Enabled = true; @@ -1182,6 +1192,7 @@ cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; + cbLyricsPluginSite.Enabled = false; cbLyricsOnDemand.Checked = false; cbLyrics007.Checked = false; @@ -1190,6 +1201,7 @@ cbHotLyrics.Checked = false; cbActionext.Checked = false; cbLyrDB.Checked = false; + cbLyricsPluginSite.Checked = false; cbMusicTagAlwaysCheck.Checked = false; cbMusicTagWrite.Checked = true; @@ -1229,6 +1241,7 @@ xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricsOnDemand", cbLyricsOnDemand.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useHotLyrics", cbHotLyrics.Checked.ToString()); + xmlwriter.SetValue("myLyrics", "useLyricsPluginSite", cbLyricsPluginSite.Checked.ToString()); xmlwriter.SetValueAsBool("myLyrics", "useAutoscroll", cbUseAutoScrollAsDefault.Checked); xmlwriter.SetValueAsBool("myLyrics", "uploadLrcToLrcFinder", cbUploadLrcAutomatically.Checked); xmlwriter.SetValueAsBool("myLyrics", "alwaysAskUploadLrcToLrcFinder", cbAlwaysAskForUploadToLrcFinder.Checked); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-08-13 16:27:09 UTC (rev 3720) @@ -123,12 +123,6 @@ <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> - <metadata name="Find.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> - <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>True</value> - </metadata> <metadata name="bgWorkerSearch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>6, 4</value> </metadata> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-08-13 16:03:06 UTC (rev 3719) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-08-13 16:27:09 UTC (rev 3720) @@ -98,7 +98,8 @@ private bool _useLyrDB; private bool _useLyrics007, - _useLyricsOnDemand; + _useLyricsOnDemand, + _useLyricsPluginSite; private bool _useLyricWiki; @@ -685,6 +686,10 @@ : false; _useLyricsOnDemand = (xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).Equals("True") ? true : false; + _useLyricsPluginSite = + (xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).Equals("True") + ? true + : false; _useHotLyrics = (xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).Equals("True") ? true : false; @@ -800,6 +805,10 @@ { sitesToSearch.Add("HotLyrics"); } + if (_useLyricsPluginSite && Setup.IsMember("LyricsPluginSite")) + { + sitesToSearch.Add("LyricsPluginSite"); + } _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Sil...@us...> - 2010-08-23 15:23:17
|
Revision: 3770 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3770&view=rev Author: SilentException Date: 2010-08-23 15:23:11 +0000 (Mon, 23 Aug 2010) Log Message: ----------- MyLyrics: Updated AssemblyInfo to v1.5.2.0 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-08-22 19:00:00 UTC (rev 3769) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2010-08-23 15:23:11 UTC (rev 3770) @@ -26,8 +26,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.5.1.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyVersion("1.5.2.0")] +[assembly: AssemblyFileVersion("1.5.2.0")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-08-22 19:00:00 UTC (rev 3769) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2010-08-23 15:23:11 UTC (rev 3770) @@ -34,5 +34,5 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.5.1.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.5.2.0")] +[assembly: AssemblyFileVersion("1.5.2.0")] \ No newline at end of file Modified: trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2010-08-22 19:00:00 UTC (rev 3769) +++ trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2010-08-23 15:23:11 UTC (rev 3770) @@ -35,5 +35,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.1.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] +[assembly: AssemblyVersion("1.5.2.0")] +[assembly: AssemblyFileVersion("1.5.2.0")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2010-09-07 16:05:53
|
Revision: 3783 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3783&view=rev Author: saamand Date: 2010-09-07 16:05:46 +0000 (Tue, 07 Sep 2010) Log Message: ----------- - removing lyricwiki Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 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/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.resx trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -5,10 +5,10 @@ { public static class Setup { - public static string[] BatchSearchSites = new string[8] + public static string[] BatchSearchSites = new string[7] { "LrcFinder", - "LyricWiki", + //"LyricWiki", "Lyrics007", "LyricsOnDemand", "HotLyrics", Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -49,7 +49,6 @@ this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btClose = new System.Windows.Forms.Button(); this.btUpdate = new System.Windows.Forms.Button(); @@ -195,7 +194,6 @@ this.gbLyricSites.Controls.Add(this.cbHotLyrics); this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); - this.gbLyricSites.Controls.Add(this.cbLyricWiki); this.gbLyricSites.Controls.Add(this.cbLyricsPluginSite); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(9, 115); @@ -224,7 +222,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(338, 44); + this.cbLyrDB.Location = new System.Drawing.Point(237, 44); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 18; @@ -237,7 +235,7 @@ 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, 44); + this.cbActionext.Location = new System.Drawing.Point(17, 44); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 17; @@ -250,7 +248,7 @@ this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(237, 44); + this.cbHotLyrics.Location = new System.Drawing.Point(131, 44); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 14; @@ -283,19 +281,6 @@ this.cbLyrics007.Text = "Lyrics 007"; this.cbLyrics007.UseVisualStyleBackColor = true; // - // cbLyricWiki - // - this.cbLyricWiki.AutoSize = true; - this.cbLyricWiki.Checked = true; - this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(18, 44); - this.cbLyricWiki.Name = "cbLyricWiki"; - this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); - this.cbLyricWiki.TabIndex = 11; - this.cbLyricWiki.Text = "LyricWiki"; - this.cbLyricWiki.UseVisualStyleBackColor = true; - // // cbLyricsPluginSite // this.cbLyricsPluginSite.AutoSize = true; @@ -334,7 +319,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(448, 575); + this.ClientSize = new System.Drawing.Size(448, 573); this.ControlBox = false; this.Controls.Add(this.btUpdate); this.Controls.Add(this.btClose); @@ -375,7 +360,6 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; 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 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -89,10 +89,6 @@ ((string) xmlreader.GetValueAsString("myLyrics", "useLrcFinder", "True")).ToString().Equals("True") ? true : false; - cbLyricWiki.Checked = - ((string) xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") - ? true - : false; cbActionext.Checked = ((string) xmlreader.GetValueAsString("myLyrics", "useActionext", "True")).ToString().Equals("True") ? true @@ -186,10 +182,6 @@ { sitesToSearch.Add("LrcFinder"); } - if (cbLyricWiki.Checked) - { - sitesToSearch.Add("LyricWiki"); - } if (cbActionext.Checked) { sitesToSearch.Add("Actionext"); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -520,8 +520,6 @@ { if (((string) xmlreader.GetValueAsString("myLyrics", "useLrcFinder", "True")).ToString().Equals("True")) sitesToSearch.Add("LrcFinder"); - if (((string) xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True")) - sitesToSearch.Add("LyricWiki"); if (((string) xmlreader.GetValueAsString("myLyrics", "useActionext", "True")).ToString().Equals("True")) sitesToSearch.Add("Actionext"); if (((string) xmlreader.GetValueAsString("myLyrics", "useLyrDB", "True")).ToString().Equals("True")) Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -105,7 +105,6 @@ this.cbActionext = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); @@ -177,7 +176,7 @@ this.tabPageMusicDatabaseBrowse.Location = new System.Drawing.Point(4, 22); this.tabPageMusicDatabaseBrowse.Name = "tabPageMusicDatabaseBrowse"; this.tabPageMusicDatabaseBrowse.Padding = new System.Windows.Forms.Padding(3); - this.tabPageMusicDatabaseBrowse.Size = new System.Drawing.Size(550, 513); + this.tabPageMusicDatabaseBrowse.Size = new System.Drawing.Size(550, 510); this.tabPageMusicDatabaseBrowse.TabIndex = 3; this.tabPageMusicDatabaseBrowse.Text = "Music database browse"; this.tabPageMusicDatabaseBrowse.UseVisualStyleBackColor = true; @@ -192,7 +191,7 @@ this.tabPageDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageDatabase.Name = "tabPageDatabase"; this.tabPageDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageDatabase.Size = new System.Drawing.Size(550, 513); + this.tabPageDatabase.Size = new System.Drawing.Size(550, 510); this.tabPageDatabase.TabIndex = 2; this.tabPageDatabase.Text = "Music database batch search"; this.tabPageDatabase.UseVisualStyleBackColor = true; @@ -934,7 +933,6 @@ this.groupBox2.Controls.Add(this.cbActionext); this.groupBox2.Controls.Add(this.cbLyrics007); this.groupBox2.Controls.Add(this.cbLyricsOnDemand); - this.groupBox2.Controls.Add(this.cbLyricWiki); this.groupBox2.Controls.Add(this.cbHotLyrics); this.groupBox2.Controls.Add(this.cbLyricsPluginSite); this.groupBox2.Location = new System.Drawing.Point(229, 48); @@ -964,7 +962,7 @@ this.cbLyrDB.Checked = true; this.cbLyrDB.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrDB.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrDB.Location = new System.Drawing.Point(216, 40); + this.cbLyrDB.Location = new System.Drawing.Point(230, 17); this.cbLyrDB.Name = "cbLyrDB"; this.cbLyrDB.Size = new System.Drawing.Size(53, 17); this.cbLyrDB.TabIndex = 9; @@ -978,7 +976,7 @@ 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(216, 17); + this.cbActionext.Location = new System.Drawing.Point(137, 61); this.cbActionext.Name = "cbActionext"; this.cbActionext.Size = new System.Drawing.Size(68, 17); this.cbActionext.TabIndex = 8; @@ -992,7 +990,7 @@ this.cbLyrics007.Checked = true; this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(130, 17); + this.cbLyrics007.Location = new System.Drawing.Point(137, 17); this.cbLyrics007.Name = "cbLyrics007"; this.cbLyrics007.Size = new System.Drawing.Size(72, 17); this.cbLyrics007.TabIndex = 4; @@ -1014,27 +1012,13 @@ this.cbLyricsOnDemand.UseVisualStyleBackColor = true; this.cbLyricsOnDemand.Leave += new System.EventHandler(this.WriteMediaPortalXML); // - // cbLyricWiki - // - this.cbLyricWiki.AutoSize = true; - this.cbLyricWiki.Checked = true; - this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(130, 40); - this.cbLyricWiki.Name = "cbLyricWiki"; - this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); - this.cbLyricWiki.TabIndex = 2; - this.cbLyricWiki.Text = "LyricWiki"; - this.cbLyricWiki.UseVisualStyleBackColor = true; - this.cbLyricWiki.Leave += new System.EventHandler(this.WriteMediaPortalXML); - // // cbHotLyrics // this.cbHotLyrics.AutoSize = true; this.cbHotLyrics.Checked = true; this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbHotLyrics.Location = new System.Drawing.Point(130, 61); + this.cbHotLyrics.Location = new System.Drawing.Point(137, 40); this.cbHotLyrics.Name = "cbHotLyrics"; this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); this.cbHotLyrics.TabIndex = 7; @@ -1134,7 +1118,7 @@ this.tabPageReplace.Location = new System.Drawing.Point(4, 22); this.tabPageReplace.Name = "tabPageReplace"; this.tabPageReplace.Padding = new System.Windows.Forms.Padding(3); - this.tabPageReplace.Size = new System.Drawing.Size(550, 513); + this.tabPageReplace.Size = new System.Drawing.Size(550, 510); this.tabPageReplace.TabIndex = 5; this.tabPageReplace.Text = "Find & Replace"; this.tabPageReplace.UseVisualStyleBackColor = true; @@ -1187,7 +1171,7 @@ this.tabPageAbout.Location = new System.Drawing.Point(4, 22); this.tabPageAbout.Name = "tabPageAbout"; this.tabPageAbout.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAbout.Size = new System.Drawing.Size(550, 513); + this.tabPageAbout.Size = new System.Drawing.Size(550, 510); this.tabPageAbout.TabIndex = 4; this.tabPageAbout.Text = "About"; this.tabPageAbout.UseVisualStyleBackColor = true; @@ -1309,7 +1293,6 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; private System.Windows.Forms.RadioButton rdLyricsMode; private System.Windows.Forms.RadioButton rbUserSelectMode; private MediaPortal.UserInterface.Controls.MPLabel mpLabel2; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -219,7 +219,6 @@ rbUserSelectMode.Checked = true; cbLrcFinder.Checked = xmlreader.GetValue("myLyrics", "useLrcFinder").Equals("True"); - cbLyricWiki.Checked = xmlreader.GetValue("myLyrics", "useLyricWiki").Equals("True"); cbActionext.Checked = xmlreader.GetValue("myLyrics", "useActionext").Equals("True"); cbLyrDB.Checked = xmlreader.GetValue("myLyrics", "useLyrDB").Equals("True"); cbLyrics007.Checked = xmlreader.GetValue("myLyrics", "useLyrics007").Equals("True"); @@ -488,8 +487,6 @@ if (cbLrcFinder.Checked) sitesToSearch.Add("LrcFinder"); - if (cbLyricWiki.Checked) - sitesToSearch.Add("LyricWiki"); if (cbActionext.Checked) sitesToSearch.Add("Actionext"); if (cbLyrDB.Checked) @@ -1088,7 +1085,6 @@ cbLyricsPluginSite.Checked = true; cbLyrics007.Checked = false; cbLrcFinder.Checked = false; - cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; cbActionext.Checked = false; cbLyrDB.Checked = false; @@ -1099,7 +1095,6 @@ cbLyricsPluginSite.Checked = true; cbLrcFinder.Checked = true; cbLyrics007.Checked = true; - cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; cbActionext.Checked = false; cbLyrDB.Checked = false; @@ -1110,7 +1105,6 @@ cbLyricsPluginSite.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; - cbLyricWiki.Checked = true; cbHotLyrics.Checked = true; cbActionext.Checked = false; cbLyrDB.Checked = false; @@ -1120,7 +1114,6 @@ cbLyricsOnDemand.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; - cbLyricWiki.Checked = true; cbHotLyrics.Checked = true; cbLyrDB.Checked = true; cbActionext.Checked = true; @@ -1140,7 +1133,6 @@ cbLyricsOnDemand.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; - cbLyricWiki.Checked = true; cbHotLyrics.Checked = true; cbLyricsPluginSite.Checked = true; @@ -1156,7 +1148,6 @@ cbLyricsOnDemand.Enabled = false; cbLyrics007.Enabled = false; cbLrcFinder.Enabled = false; - cbLyricWiki.Enabled = false; cbLyricsPluginSite.Enabled = false; cbHotLyrics.Enabled = false; cbActionext.Enabled = false; @@ -1175,7 +1166,6 @@ cbLyricsOnDemand.Enabled = true; cbLyrics007.Enabled = true; cbLrcFinder.Enabled = true; - cbLyricWiki.Enabled = true; cbLyricsPluginSite.Enabled = true; cbHotLyrics.Enabled = true; cbActionext.Enabled = true; @@ -1185,19 +1175,9 @@ { trackBar.Enabled = false; - cbLyricsOnDemand.Enabled = false; - cbLyrics007.Enabled = false; - cbLrcFinder.Enabled = false; - cbLyricWiki.Enabled = false; - cbHotLyrics.Enabled = false; - cbActionext.Enabled = false; - cbLyrDB.Enabled = false; - cbLyricsPluginSite.Enabled = false; - cbLyricsOnDemand.Checked = false; cbLyrics007.Checked = false; cbLrcFinder.Checked = true; - cbLyricWiki.Checked = false; cbHotLyrics.Checked = false; cbActionext.Checked = false; cbLyrDB.Checked = false; @@ -1235,7 +1215,6 @@ xmlwriter.SetValue("myLyrics", "defaultSitesModeValue", trackBar.Value); xmlwriter.SetValue("myLyrics", "limit", tbLimit.Text); xmlwriter.SetValue("myLyrics", "useLrcFinder", cbLrcFinder.Checked.ToString()); - xmlwriter.SetValue("myLyrics", "useLyricWiki", cbLyricWiki.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useActionext", cbActionext.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyrDB", cbLyrDB.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString()); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2010-09-07 16:05:46 UTC (rev 3783) @@ -123,6 +123,12 @@ <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="Find.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="Replace.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="bgWorkerSearch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>6, 4</value> </metadata> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-09-04 15:37:49 UTC (rev 3782) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-09-07 16:05:46 UTC (rev 3783) @@ -101,8 +101,6 @@ _useLyricsOnDemand, _useLyricsPluginSite; - private bool _useLyricWiki; - private bool _ValidLrcLyric; // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) @@ -678,9 +676,6 @@ _useLrcFinder = (xmlreader.GetValueAsString("myLyrics", "useLrcFinder", "True")).Equals("True") ? true : false; - _useLyricWiki = (xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).Equals("True") - ? true - : false; _useLyrics007 = (xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).Equals("True") ? true : false; @@ -781,10 +776,7 @@ //{ // sitesToSearch.Add("LrcFinder"); //} - if (_useLyricWiki && Setup.IsMember("LyricWiki")) - { - sitesToSearch.Add("LyricWiki"); - } + if (_useActionext && Setup.IsMember("Actionext")) { sitesToSearch.Add("Actionext"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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. |
From: <sa...@us...> - 2010-12-04 17:50:09
|
Revision: 4005 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4005&view=rev Author: saamand Date: 2010-12-04 17:50:02 +0000 (Sat, 04 Dec 2010) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Web References/lrcfinder/Reference.cs trunk/plugins/MyLyrics/LyricsEngine/app.config trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/My Lyrics/Properties/Resources.Designer.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt trunk/plugins/MyLyrics/MyLyrics.sln Property Changed: ---------------- trunk/plugins/MyLyrics/LyricsEngine/ trunk/plugins/MyLyrics/My Lyrics/ Property changes on: trunk/plugins/MyLyrics/LyricsEngine ___________________________________________________________________ Modified: svn:ignore - *.suo *.user thumbs.db + *.suo *.user thumbs.db [Bb]in obj [Dd]ebug [Rr]elease *.aps *.eto Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,4 +1,5 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -15,8 +16,25 @@ </FileUpgradeFlags> <UpgradeBackupLocation> </UpgradeBackupLocation> - <OldToolsVersion>2.0</OldToolsVersion> + <OldToolsVersion>3.5</OldToolsVersion> <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -110,7 +128,6 @@ <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Reference.map</DependentUpon> - <SubType>Component</SubType> </Compile> <Compile Include="LyricsSites\LyricWiki.cs" /> </ItemGroup> @@ -138,6 +155,23 @@ <LastGenOutput>Reference.cs</LastGenOutput> </None> </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> + <Visible>False</Visible> + <ProductName>Windows Installer 3.1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Resources.Designer.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.1434 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.3074 +// Runtime Version:4.0.30319.1 // // 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", "9.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.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/Web References/lrcfinder/Reference.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Web References/lrcfinder/Reference.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/LyricsEngine/Web References/lrcfinder/Reference.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,7 +1,7 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.3053 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -9,477 +9,384 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.3053. +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1. // -using System; -using System.CodeDom.Compiler; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Threading; -using System.Web.Services; -using System.Web.Services.Description; -using System.Web.Services.Protocols; -using LyricsEngine.Properties; - #pragma warning disable 1591 -namespace LyricsEngine.lrcfinder -{ +namespace LyricsEngine.lrcfinder { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.ComponentModel; + using System.Xml.Serialization; + using System.Data; + + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - [WebServiceBinding(Name = "LrcFinderSoap", Namespace = "http://tempuri.org/")] - public partial class LrcFinder : SoapHttpClientProtocol - { - private SendOrPostCallback FindLRCOperationCompleted; - - private SendOrPostCallback FindLRCsOperationCompleted; - private SendOrPostCallback NewDomainOperationCompleted; - - private SendOrPostCallback SaveLRCOperationCompleted; - - private SendOrPostCallback SaveLRCWithGuidOperationCompleted; - + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="LrcFinderSoap", Namespace="http://tempuri.org/")] + public partial class LrcFinder : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback FindLRCOperationCompleted; + + private System.Threading.SendOrPostCallback FindLRCsOperationCompleted; + + private System.Threading.SendOrPostCallback SaveLRCOperationCompleted; + + private System.Threading.SendOrPostCallback SaveLRCWithGuidOperationCompleted; + + private System.Threading.SendOrPostCallback NewDomainOperationCompleted; + private bool useDefaultCredentialsSetExplicitly; - + /// <remarks/> - public LrcFinder() - { - Url = Settings.Default.LyricsEngine_lrcfinder_LrcFinder; - if ((IsLocalFileSystemWebService(Url) == true)) - { - UseDefaultCredentials = true; - useDefaultCredentialsSetExplicitly = false; + public LrcFinder() { + this.Url = global::LyricsEngine.Properties.Settings.Default.LyricsEngine_lrcfinder_LrcFinder; + if ((this.IsLocalFileSystemWebService(this.Url) == true)) { + this.UseDefaultCredentials = true; + this.useDefaultCredentialsSetExplicitly = false; } - else - { - useDefaultCredentialsSetExplicitly = true; + else { + this.useDefaultCredentialsSetExplicitly = true; } } - - public new string Url - { - get { return base.Url; } - set - { - if ((((IsLocalFileSystemWebService(base.Url) == true) - && (useDefaultCredentialsSetExplicitly == false)) - && (IsLocalFileSystemWebService(value) == false))) - { + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { base.UseDefaultCredentials = false; } base.Url = value; } } - - public new bool UseDefaultCredentials - { - get { return base.UseDefaultCredentials; } - set - { + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { base.UseDefaultCredentials = value; - useDefaultCredentialsSetExplicitly = true; + this.useDefaultCredentialsSetExplicitly = true; } } - + /// <remarks/> public event FindLRCCompletedEventHandler FindLRCCompleted; - + /// <remarks/> public event FindLRCsCompletedEventHandler FindLRCsCompleted; - + /// <remarks/> public event SaveLRCCompletedEventHandler SaveLRCCompleted; - + /// <remarks/> public event SaveLRCWithGuidCompletedEventHandler SaveLRCWithGuidCompleted; - + /// <remarks/> public event NewDomainCompletedEventHandler NewDomainCompleted; - + /// <remarks/> - [SoapDocumentMethod("http://tempuri.org/FindLRC", RequestNamespace = "http://tempuri.org/", - ResponseNamespace = "http://tempuri.org/", Use = SoapBindingUse.Literal, - ParameterStyle = SoapParameterStyle.Wrapped)] - public string FindLRC(string artist, string title) - { - object[] results = Invoke("FindLRC", new object[] - { - artist, - title - }); - return ((string) (results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/FindLRC", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string FindLRC(string artist, string title) { + object[] results = this.Invoke("FindLRC", new object[] { + artist, + title}); + return ((string)(results[0])); } - + /// <remarks/> - public void FindLRCAsync(string artist, string title) - { - FindLRCAsync(artist, title, null); + public void FindLRCAsync(string artist, string title) { + this.FindLRCAsync(artist, title, null); } - + /// <remarks/> - public void FindLRCAsync(string artist, string title, object userState) - { - if ((FindLRCOperationCompleted == null)) - { - FindLRCOperationCompleted = new SendOrPostCallback(OnFindLRCOperationCompleted); + public void FindLRCAsync(string artist, string title, object userState) { + if ((this.FindLRCOperationCompleted == null)) { + this.FindLRCOperationCompleted = new System.Threading.SendOrPostCallback(this.OnFindLRCOperationCompleted); } - InvokeAsync("FindLRC", new object[] - { - artist, - title - }, FindLRCOperationCompleted, userState); + this.InvokeAsync("FindLRC", new object[] { + artist, + title}, this.FindLRCOperationCompleted, userState); } - - private void OnFindLRCOperationCompleted(object arg) - { - if ((FindLRCCompleted != null)) - { - InvokeCompletedEventArgs invokeArgs = ((InvokeCompletedEventArgs) (arg)); - FindLRCCompleted(this, - new FindLRCCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, - invokeArgs.Cancelled, invokeArgs.UserState)); + + private void OnFindLRCOperationCompleted(object arg) { + if ((this.FindLRCCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.FindLRCCompleted(this, new FindLRCCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// <remarks/> - [SoapDocumentMethod("http://tempuri.org/FindLRCs", RequestNamespace = "http://tempuri.org/", - ResponseNamespace = "http://tempuri.org/", Use = SoapBindingUse.Literal, - ParameterStyle = SoapParameterStyle.Wrapped)] - public DataTable FindLRCs(string artist, string title) - { - object[] results = Invoke("FindLRCs", new object[] - { - artist, - title - }); - return ((DataTable) (results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/FindLRCs", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public System.Data.DataTable FindLRCs(string artist, string title) { + object[] results = this.Invoke("FindLRCs", new object[] { + artist, + title}); + return ((System.Data.DataTable)(results[0])); } - + /// <remarks/> - public void FindLRCsAsync(string artist, string title) - { - FindLRCsAsync(artist, title, null); + public void FindLRCsAsync(string artist, string title) { + this.FindLRCsAsync(artist, title, null); } - + /// <remarks/> - public void FindLRCsAsync(string artist, string title, object userState) - { - if ((FindLRCsOperationCompleted == null)) - { - FindLRCsOperationCompleted = new SendOrPostCallback(OnFindLRCsOperationCompleted); + public void FindLRCsAsync(string artist, string title, object userState) { + if ((this.FindLRCsOperationCompleted == null)) { + this.FindLRCsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnFindLRCsOperationCompleted); } - InvokeAsync("FindLRCs", new object[] - { - artist, - title - }, FindLRCsOperationCompleted, userState); + this.InvokeAsync("FindLRCs", new object[] { + artist, + title}, this.FindLRCsOperationCompleted, userState); } - - private void OnFindLRCsOperationCompleted(object arg) - { - if ((FindLRCsCompleted != null)) - { - InvokeCompletedEventArgs invokeArgs = ((InvokeCompletedEventArgs) (arg)); - FindLRCsCompleted(this, - new FindLRCsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, - invokeArgs.Cancelled, invokeArgs.UserState)); + + private void OnFindLRCsOperationCompleted(object arg) { + if ((this.FindLRCsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.FindLRCsCompleted(this, new FindLRCsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// <remarks/> - [SoapDocumentMethod("http://tempuri.org/SaveLRC", RequestNamespace = "http://tempuri.org/", - ResponseNamespace = "http://tempuri.org/", Use = SoapBindingUse.Literal, - ParameterStyle = SoapParameterStyle.Wrapped)] - public string SaveLRC(string lrcFileString) - { - object[] results = Invoke("SaveLRC", new object[] - { - lrcFileString - }); - return ((string) (results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SaveLRC", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string SaveLRC(string lrcFileString) { + object[] results = this.Invoke("SaveLRC", new object[] { + lrcFileString}); + return ((string)(results[0])); } - + /// <remarks/> - public void SaveLRCAsync(string lrcFileString) - { - SaveLRCAsync(lrcFileString, null); + public void SaveLRCAsync(string lrcFileString) { + this.SaveLRCAsync(lrcFileString, null); } - + /// <remarks/> - public void SaveLRCAsync(string lrcFileString, object userState) - { - if ((SaveLRCOperationCompleted == null)) - { - SaveLRCOperationCompleted = new SendOrPostCallback(OnSaveLRCOperationCompleted); + public void SaveLRCAsync(string lrcFileString, object userState) { + if ((this.SaveLRCOperationCompleted == null)) { + this.SaveLRCOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveLRCOperationCompleted); } - InvokeAsync("SaveLRC", new object[] - { - lrcFileString - }, SaveLRCOperationCompleted, userState); + this.InvokeAsync("SaveLRC", new object[] { + lrcFileString}, this.SaveLRCOperationCompleted, userState); } - - private void OnSaveLRCOperationCompleted(object arg) - { - if ((SaveLRCCompleted != null)) - { - InvokeCompletedEventArgs invokeArgs = ((InvokeCompletedEventArgs) (arg)); - SaveLRCCompleted(this, - new SaveLRCCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, - invokeArgs.Cancelled, invokeArgs.UserState)); + + private void OnSaveLRCOperationCompleted(object arg) { + if ((this.SaveLRCCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SaveLRCCompleted(this, new SaveLRCCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// <remarks/> - [SoapDocumentMethod("http://tempuri.org/SaveLRCWithGuid", RequestNamespace = "http://tempuri.org/", - ResponseNamespace = "http://tempuri.org/", Use = SoapBindingUse.Literal, - ParameterStyle = SoapParameterStyle.Wrapped)] - public string SaveLRCWithGuid(string lrcFileString, Guid guid) - { - object[] results = Invoke("SaveLRCWithGuid", new object[] - { - lrcFileString, - guid - }); - return ((string) (results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SaveLRCWithGuid", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string SaveLRCWithGuid(string lrcFileString, System.Guid guid) { + object[] results = this.Invoke("SaveLRCWithGuid", new object[] { + lrcFileString, + guid}); + return ((string)(results[0])); } - + /// <remarks/> - public void SaveLRCWithGuidAsync(string lrcFileString, Guid guid) - { - SaveLRCWithGuidAsync(lrcFileString, guid, null); + public void SaveLRCWithGuidAsync(string lrcFileString, System.Guid guid) { + this.SaveLRCWithGuidAsync(lrcFileString, guid, null); } - + /// <remarks/> - public void SaveLRCWithGuidAsync(string lrcFileString, Guid guid, object userState) - { - if ((SaveLRCWithGuidOperationCompleted == null)) - { - SaveLRCWithGuidOperationCompleted = new SendOrPostCallback(OnSaveLRCWithGuidOperationCompleted); + public void SaveLRCWithGuidAsync(string lrcFileString, System.Guid guid, object userState) { + if ((this.SaveLRCWithGuidOperationCompleted == null)) { + this.SaveLRCWithGuidOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSaveLRCWithGuidOperationCompleted); } - InvokeAsync("SaveLRCWithGuid", new object[] - { - lrcFileString, - guid - }, SaveLRCWithGuidOperationCompleted, userState); + this.InvokeAsync("SaveLRCWithGuid", new object[] { + lrcFileString, + guid}, this.SaveLRCWithGuidOperationCompleted, userState); } - - private void OnSaveLRCWithGuidOperationCompleted(object arg) - { - if ((SaveLRCWithGuidCompleted != null)) - { - InvokeCompletedEventArgs invokeArgs = ((InvokeCompletedEventArgs) (arg)); - SaveLRCWithGuidCompleted(this, - new SaveLRCWithGuidCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, - invokeArgs.Cancelled, - invokeArgs.UserState)); + + private void OnSaveLRCWithGuidOperationCompleted(object arg) { + if ((this.SaveLRCWithGuidCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.SaveLRCWithGuidCompleted(this, new SaveLRCWithGuidCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// <remarks/> - [SoapDocumentMethod("http://tempuri.org/NewDomain", RequestNamespace = "http://tempuri.org/", - ResponseNamespace = "http://tempuri.org/", Use = SoapBindingUse.Literal, - ParameterStyle = SoapParameterStyle.Wrapped)] - public string[] NewDomain() - { - object[] results = Invoke("NewDomain", new object[0]); - return ((string[]) (results[0])); + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/NewDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public string[] NewDomain() { + object[] results = this.Invoke("NewDomain", new object[0]); + return ((string[])(results[0])); } - + /// <remarks/> - public void NewDomainAsync() - { - NewDomainAsync(null); + public void NewDomainAsync() { + this.NewDomainAsync(null); } - + /// <remarks/> - public void NewDomainAsync(object userState) - { - if ((NewDomainOperationCompleted == null)) - { - NewDomainOperationCompleted = new SendOrPostCallback(OnNewDomainOperationCompleted); + public void NewDomainAsync(object userState) { + if ((this.NewDomainOperationCompleted == null)) { + this.NewDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnNewDomainOperationCompleted); } - InvokeAsync("NewDomain", new object[0], NewDomainOperationCompleted, userState); + this.InvokeAsync("NewDomain", new object[0], this.NewDomainOperationCompleted, userState); } - - private void OnNewDomainOperationCompleted(object arg) - { - if ((NewDomainCompleted != null)) - { - InvokeCompletedEventArgs invokeArgs = ((InvokeCompletedEventArgs) (arg)); - NewDomainCompleted(this, - new NewDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, - invokeArgs.Cancelled, invokeArgs.UserState)); + + private void OnNewDomainOperationCompleted(object arg) { + if ((this.NewDomainCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.NewDomainCompleted(this, new NewDomainCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); } } - + /// <remarks/> - public new void CancelAsync(object userState) - { + public new void CancelAsync(object userState) { base.CancelAsync(userState); } - - private bool IsLocalFileSystemWebService(string url) - { - if (((url == null) - || (url == string.Empty))) - { + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { return false; } - Uri wsUri = new Uri(url); - if (((wsUri.Port >= 1024) - && (string.Compare(wsUri.Host, "localHost", StringComparison.OrdinalIgnoreCase) == 0))) - { + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { return true; } return false; } } - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] public delegate void FindLRCCompletedEventHandler(object sender, FindLRCCompletedEventArgs e); - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - public partial class FindLRCCompletedEventArgs : AsyncCompletedEventArgs - { + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class FindLRCCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal FindLRCCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal FindLRCCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// <remarks/> - public string Result - { - get - { - RaiseExceptionIfNecessary(); - return ((string) (results[0])); + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); } } } - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] public delegate void FindLRCsCompletedEventHandler(object sender, FindLRCsCompletedEventArgs e); - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - public partial class FindLRCsCompletedEventArgs : AsyncCompletedEventArgs - { + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class FindLRCsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal FindLRCsCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal FindLRCsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// <remarks/> - public DataTable Result - { - get - { - RaiseExceptionIfNecessary(); - return ((DataTable) (results[0])); + public System.Data.DataTable Result { + get { + this.RaiseExceptionIfNecessary(); + return ((System.Data.DataTable)(this.results[0])); } } } - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] public delegate void SaveLRCCompletedEventHandler(object sender, SaveLRCCompletedEventArgs e); - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - public partial class SaveLRCCompletedEventArgs : AsyncCompletedEventArgs - { + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SaveLRCCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SaveLRCCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal SaveLRCCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// <remarks/> - public string Result - { - get - { - RaiseExceptionIfNecessary(); - return ((string) (results[0])); + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); } } } - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] public delegate void SaveLRCWithGuidCompletedEventHandler(object sender, SaveLRCWithGuidCompletedEventArgs e); - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - public partial class SaveLRCWithGuidCompletedEventArgs : AsyncCompletedEventArgs - { + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SaveLRCWithGuidCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal SaveLRCWithGuidCompletedEventArgs(object[] results, Exception exception, bool cancelled, - object userState) : - base(exception, cancelled, userState) - { + + internal SaveLRCWithGuidCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// <remarks/> - public string Result - { - get - { - RaiseExceptionIfNecessary(); - return ((string) (results[0])); + public string Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[0])); } } } - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] public delegate void NewDomainCompletedEventHandler(object sender, NewDomainCompletedEventArgs e); - + /// <remarks/> - [GeneratedCode("System.Web.Services", "2.0.50727.3053")] - [DebuggerStepThrough()] - [DesignerCategory("code")] - public partial class NewDomainCompletedEventArgs : AsyncCompletedEventArgs - { + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class NewDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + private object[] results; - - internal NewDomainCompletedEventArgs(object[] results, Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) - { + + internal NewDomainCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { this.results = results; } - + /// <remarks/> - public string[] Result - { - get - { - RaiseExceptionIfNecessary(); - return ((string[]) (results[0])); + public string[] Result { + get { + this.RaiseExceptionIfNecessary(); + return ((string[])(this.results[0])); } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/app.config =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/app.config 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/LyricsEngine/app.config 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,8 +1,8 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0"?> <configuration> <configSections> - <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > - <section name="LyricsEngine.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <section name="LyricsEngine.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> </sectionGroup> </configSections> <applicationSettings> @@ -18,4 +18,4 @@ </setting> </LyricsEngine.Properties.Settings> </applicationSettings> -</configuration> \ No newline at end of file +<startup><supportedRuntime version="v2.0.50727"/></startup></configuration> Property changes on: trunk/plugins/MyLyrics/My Lyrics ___________________________________________________________________ Modified: svn:ignore - *.suo *.user thumbs.db + *.suo *.user thumbs.db [Bb]in obj [Dd]ebug [Rr]elease *.aps *.eto Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -80,7 +80,7 @@ this.lbInfo1.Name = "lbInfo1"; this.lbInfo1.Size = new System.Drawing.Size(197, 18); this.lbInfo1.TabIndex = 3; - this.lbInfo1.Text = "MyLyrics plugin, version 1.5.2.0"; + this.lbInfo1.Text = "MyLyrics plugin, version 1.5.5.0"; // // label2 // Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -234,7 +234,7 @@ rdTrackBar_CheckedChanged(null, null); tbLimit.Text = xmlreader.GetValueAsString("myLyrics", "limit", m_TotalTitles.ToString()); - tbPluginName.Text = xmlreader.GetValueAsString("myLyrics", "pluginsName", "My Lyrics"); + tbPluginName.Text = xmlreader.GetValueAsString("myLyrics", "pluginsName", "Lyrics"); m_enableLogging = xmlreader.GetValue("myLyrics", "loggingEnabled").Equals("True"); cbEnableLogging.Checked = m_enableLogging; @@ -251,7 +251,7 @@ cbMusicTagAlwaysCheck.Checked = m_automaticReadFromToMusicTag; cbUseAutoScrollAsDefault.Checked = xmlreader.GetValue("myLyrics", "useAutoscroll").Equals("yes"); - tbLrcTaggingOffset.Text = xmlreader.GetValueAsString("myLyrics", "LrcTaggingOffset", "0"); + tbLrcTaggingOffset.Text = xmlreader.GetValueAsString("myLyrics", "LrcTaggingOffset", "500"); tbLrcTaggingName.Text = xmlreader.GetValueAsString("myLyrics", "LrcTaggingName", ""); m_guidString = ((string) xmlreader.GetValueAsString("myLyrics", "Guid", "")); @@ -1183,6 +1183,14 @@ cbLyrDB.Checked = false; cbLyricsPluginSite.Checked = false; + cbLyricsOnDemand.Enabled = false; + cbLyrics007.Enabled = false; + cbLrcFinder.Enabled = false; + cbLyricsPluginSite.Enabled = false; + cbHotLyrics.Enabled = false; + cbActionext.Enabled = false; + cbLyrDB.Enabled = false; + cbMusicTagAlwaysCheck.Checked = false; cbMusicTagWrite.Checked = true; @@ -1230,7 +1238,9 @@ xmlwriter.SetValueAsBool("myLyrics", "moveLyricFromMarkedDatabase", cbMoveSongFrom.Checked); xmlwriter.SetValueAsBool("myLyrics", "automaticWriteToMusicTag", cbMusicTagWrite.Checked); xmlwriter.SetValueAsBool("myLyrics", "automaticReadFromMusicTag", cbMusicTagAlwaysCheck.Checked); + xmlwriter.SetValue("myLyrics", "LrcTaggingOffset", tbLrcTaggingOffset.Text); + string text = comboBoxLanguages.SelectedItem as string; if (!string.IsNullOrEmpty(text)) { Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -704,7 +704,11 @@ (xmlreader.GetValueAsString("myLyrics", "useAutoOnLyricLength", "False")).Equals("yes") ? true : false; - _LrcTaggingOffset = (xmlreader.GetValueAsString("myLyrics", "LrcTaggingOffset", "0")); + _LrcTaggingOffset = (xmlreader.GetValueAsString("myLyrics", "LrcTaggingOffset", "´500")); + + string strButtonText = (xmlreader.GetValueAsString("myLyrics", "pluginsName", "My Lyrics")); + GUIPropertyManager.SetProperty("#currentmodule", strButtonText); + _LrcTaggingName = (xmlreader.GetValueAsString("myLyrics", "LrcTaggingName", "")); _uploadLrcToLrcFinder = @@ -919,11 +923,11 @@ return base.OnMessage(message); } - public override void OnAction(Action action) + public override void OnAction(MediaPortal.GUI.Library.Action action) { if (!enableMouseControl()) { - if (action.wID == Action.ActionType.ACTION_MOUSE_MOVE) + if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOUSE_MOVE) { return; } @@ -933,21 +937,21 @@ switch (action.wID) { - case Action.ActionType.ACTION_PREVIOUS_MENU: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_PREVIOUS_MENU: { //_OkToCallPreviousMenu = true; //GUIWindowManager.ShowPreviousWindow(); //return; break; } - case Action.ActionType.ACTION_MOVE_LEFT: - case Action.ActionType.ACTION_MOVE_RIGHT: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_LEFT: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT: { if (_selectedScreen == (int)MyLyricsSettings.Screen.LRC_PICK) { - if (action.wID == Action.ActionType.ACTION_MOVE_LEFT) + if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_LEFT) _selectedinLRCPicker--; - if (action.wID == Action.ActionType.ACTION_MOVE_RIGHT) + if (action.wID == MediaPortal.GUI.Library.Action.ActionType.ACTION_MOVE_RIGHT) _selectedinLRCPicker++; if (_selectedinLRCPicker < 0) @@ -965,7 +969,7 @@ } break; } - case Action.ActionType.ACTION_SELECT_ITEM: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_SELECT_ITEM: { if (!isFocusedBlacklisted()) { @@ -976,7 +980,7 @@ } break; } - case Action.ActionType.ACTION_KEY_PRESSED: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_KEY_PRESSED: { if (/*action.m_key.KeyChar.Equals(13) || */action.m_key.KeyChar.Equals(35) || action.m_key.KeyChar.Equals(41)) // 'Enter' or '#' or ')' { @@ -1162,19 +1166,19 @@ } break; } - case Action.ActionType.ACTION_REWIND: - case Action.ActionType.ACTION_FORWARD: - case Action.ActionType.ACTION_MUSIC_FORWARD: - case Action.ActionType.ACTION_MUSIC_PLAY: - case Action.ActionType.ACTION_MUSIC_REWIND: - case Action.ActionType.ACTION_PAUSE: - case Action.ActionType.ACTION_PLAY: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_REWIND: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_FORWARD: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_MUSIC_FORWARD: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_MUSIC_PLAY: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_MUSIC_REWIND: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_PAUSE: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_PLAY: { break; } - case Action.ActionType.ACTION_EXIT: - case Action.ActionType.ACTION_END: - case Action.ActionType.ACTION_SHUTDOWN: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_EXIT: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_END: + case MediaPortal.GUI.Library.Action.ActionType.ACTION_SHUTDOWN: { break; } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,4 +1,5 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> @@ -17,7 +18,9 @@ </FileUpgradeFlags> <UpgradeBackupLocation> </UpgradeBackupLocation> - <OldToolsVersion>2.0</OldToolsVersion> + <OldToolsVersion>3.5</OldToolsVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <PublishUrl>publish\</PublishUrl> <Install>true</Install> <InstallFrom>Disk</InstallFrom> @@ -30,9 +33,9 @@ <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -214,6 +217,11 @@ </ProjectReference> </ItemGroup> <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> <Visible>False</Visible> <ProductName>.NET Framework 2.0 %28x86%29</ProductName> @@ -229,6 +237,11 @@ <ProductName>.NET Framework 3.5</ProductName> <Install>false</Install> </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> </ItemGroup> <ItemGroup> <Content Include="change log.txt" /> Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/Resources.Designer.cs 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/Resources.Designer.cs 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.1434 +// Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -19,7 +19,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { Modified: trunk/plugins/MyLyrics/My Lyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/My Lyrics/change log.txt 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,4 +1,4 @@ -Release notes to MyLyrics 1.5.3.0 +Release notes to MyLyrics 1.5.5.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,10 +33,7 @@ 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. -- Rem: LyricWiki didn't work and could not be fixed. +Changes and fixes since version 1.5.3.0 +- Add: Gui property #currentmodule returns user defined plugin name +- Fix: LRC tagging offset value wasn't saved in version 1.5.2.0 +- Fix: Minor fixes in configuration \ No newline at end of file Modified: trunk/plugins/MyLyrics/MyLyrics.sln =================================================================== --- trunk/plugins/MyLyrics/MyLyrics.sln 2010-12-04 09:34:26 UTC (rev 4004) +++ trunk/plugins/MyLyrics/MyLyrics.sln 2010-12-04 17:50:02 UTC (rev 4005) @@ -1,6 +1,6 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LyricsEngine", "LyricsEngine\LyricsEngine.csproj", "{B0760CE8-086F-4301-9091-C9BE54F261FD}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyLyrics", "My Lyrics\MyLyrics.csproj", "{BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2011-05-29 09:43:10
|
Revision: 4234 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4234&view=rev Author: saamand Date: 2011-05-29 09:43:03 +0000 (Sun, 29 May 2011) Log Message: ----------- Version 1.6.1.0: Add: Support for Shiron.net Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 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.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.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/change log.txt Added Paths: ----------- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Shironet.cs Removed Paths: ------------- trunk/plugins/MyLyrics/Skin/Blue3wide/ Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2011-05-29 09:43:03 UTC (rev 4234) @@ -95,6 +95,7 @@ <Compile Include="LyricsSites\Lyrics007.cs" /> <Compile Include="LyricsSites\LyricsOnDemand.cs" /> <Compile Include="LyricsSites\LyricsPluginSite.cs" /> + <Compile Include="LyricsSites\Shironet.cs" /> <Compile Include="LyricsWebClient.cs"> <SubType>Component</SubType> </Compile> Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Actionext.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class Actionext { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class HotLyrics { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -2,7 +2,7 @@ using System.Data; using System.Net; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { public class LrcFinder { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyrDB.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class LyrDB { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricWiki.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class LyricWiki { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -7,7 +7,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class Lyrics007 { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer=System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class LyricsOnDemand { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsPluginSite.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Timers; using Timer = System.Timers.Timer; -namespace LyricsEngine.LyricSites +namespace LyricsEngine.LyricsSites { internal class LyricsPluginSite { Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Shironet.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Shironet.cs (rev 0) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Shironet.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -0,0 +1,403 @@ +using System; +using System.IO; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading; +using System.Timers; +using Timer = System.Timers.Timer; + +namespace LyricsEngine.LyricsSites +{ + // This class searches www.shiron.net for Hebrew lyrics + public class Shironet + { + // artist/title for validation + private readonly string _artist; + private readonly string _title; + + // Lyrics + private string _lyric = ""; + + // step 1 output + private string _prfid; + private string _wrkid; + private bool _firstStepComplete; + private bool _complete; + + private readonly Timer _timer; + + public Shironet(string artist, string title, WaitHandle mEventStopSiteSearches, int timeLimit) + { + _artist = artist; + _title = title; + + _timer = new Timer(); + + // 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 += TimerElapsed; + _timer.Start(); + + // 1st step - find lyrics page + var firstUrlString = "http://www.shiron.net/searchSongs?type=lyrics&q=" + artist + "%20" + title; + + var findLyricsPageWebClient = new LyricsWebClient(); + findLyricsPageWebClient.OpenReadCompleted += FirstCallbackMethod; + findLyricsPageWebClient.OpenReadAsync(new Uri(firstUrlString)); + + while (_firstStepComplete == false) + { + if (mEventStopSiteSearches.WaitOne(1, true)) + { + _firstStepComplete = true; + } + else + { + Thread.Sleep(100); + } + } + + // 2nd step - find lyrics + var secondUrlString = "http://www.shiron.net/artist?type=lyrics&lang=1&prfid=" + _prfid + "&wrkid=" + _wrkid; + + var findLyricsWebClient = new LyricsWebClient(firstUrlString); + findLyricsWebClient.OpenReadCompleted += SecondCallbackMethod; + findLyricsWebClient.OpenReadAsync(new Uri(secondUrlString)); + + while (_complete == false) + { + if (mEventStopSiteSearches.WaitOne(1, true)) + { + _complete = true; + } + else + { + Thread.Sleep(100); + } + } + } + + public string Lyric + { + get { return _lyric; } + } + + // Finds lyrics page + private void FirstCallbackMethod(object sender, OpenReadCompletedEventArgs e) + { + var thisMayBeTheCorrectPage = false; + + Stream reply = null; + StreamReader reader = null; + + try + { + reply = e.Result; + reader = new StreamReader(reply, Encoding.UTF8); + + // RegEx to find lyrics page + const string findLyricsPagePattern = "<a href=\\\"/artist\\?type=lyrics&lang=1&prfid=(?<prfid>\\d+)&wrkid=(?<wrkid>\\d+)\\\" class=\\\"search_link_name_big\\\">"; + + while (!thisMayBeTheCorrectPage) + { + // Read line + if (reader.EndOfStream) + { + break; + } + var line = reader.ReadLine() ?? ""; + + // Try to find match in line + var findLyricsPageMatch = Regex.Match(line, findLyricsPagePattern, RegexOptions.IgnoreCase); + + if (findLyricsPageMatch.Groups.Count == 3) + { + _prfid = findLyricsPageMatch.Groups[1].Value; + _wrkid = findLyricsPageMatch.Groups[2].Value; + + if (Convert.ToUInt32(_prfid) > 0 && Convert.ToUInt32(_wrkid) > 0) + { + // Found page + thisMayBeTheCorrectPage = true; + } + } + } + + // Not found + if (!thisMayBeTheCorrectPage) + { + _lyric = "Not found"; + } + + } + catch + { + _lyric = "Not found"; + } + finally + { + if (reader != null) + { + reader.Close(); + } + + if (reply != null) + { + reply.Close(); + } + _firstStepComplete = true; + } + } + + // Find lyrics + private void SecondCallbackMethod(object sender, OpenReadCompletedEventArgs e) + { + var thisMayBeTheCorrectLyric = false; + var lyricTemp = new StringBuilder(); + + Stream reply = null; + StreamReader reader = null; + + try + { + reply = e.Result; + reader = new StreamReader(reply, Encoding.UTF8); + + // Title RegEx + const string titleSearchPattern = "<title>(?<title>.*?)</title>"; + // Lyrics start RegEx + const string lyricsStartSearchPattern = "<span class=\\\"artist_lyrics_text\\\">(?<lyricsStart>.*)"; + // Lyrics end RegEx + const string lyricsEndSearchPattern = "(?<lyricsEnd>.*?)</span>"; + + var titleLine = ""; + var foundStart = false; + + while (!_complete) + { + // Read line + if (reader.EndOfStream) + { + break; + } + var line = reader.ReadLine() ?? ""; + + // Find artist + title in <title> line and validate correct artist/title + if (titleLine == "") + { + var findLyricsPageMatch = Regex.Match(line, titleSearchPattern, RegexOptions.IgnoreCase); + if (findLyricsPageMatch.Groups.Count == 2) + { + titleLine = findLyricsPageMatch.Groups[1].Value; + } + + // validation + if (!ValidateArtistAndTitle(titleLine)) + { + throw new ArgumentException("Cannot find exact match"); + } + } + + if (!foundStart) + { + // Try to find lyrics start in line + var findLyricsPageMatch = Regex.Match(line, lyricsStartSearchPattern, RegexOptions.IgnoreCase); + + if (findLyricsPageMatch.Groups.Count == 2) + { + foundStart = true; + + // Initialize with first line + lyricTemp.Append(findLyricsPageMatch.Groups[1].Value).Append(Environment.NewLine); + } + + } + else // already found start + { + // Try to find lyrics end in line + var findLyricsPageMatch = Regex.Match(line, lyricsEndSearchPattern, RegexOptions.IgnoreCase); + if (findLyricsPageMatch.Groups.Count == 2) + { + // Add last line + lyricTemp.Append(findLyricsPageMatch.Groups[1].Value).Append(Environment.NewLine); + thisMayBeTheCorrectLyric = true; + break; + } + + // Add line to lyrics + lyricTemp.Append(line).Append(Environment.NewLine); + } + } + + if (thisMayBeTheCorrectLyric) + { + // Clean lyrics + _lyric = CleanLyrics(lyricTemp); + + if (_lyric.Length == 0 || (_lyric.Contains("<") || _lyric.Contains(">") || _lyric.Contains("a href"))) + { + _lyric = "Not found"; + } + } + } + catch + { + _lyric = "Not found"; + } + finally + { + if (reader != null) + { + reader.Close(); + } + + if (reply != null) + { + reply.Close(); + } + _complete = true; + } + } + + private bool ValidateArtistAndTitle(string titleLine) + { + bool validated = true; + string[] strings = titleLine.Split('-'); + if (strings.Length == 3) + { + // check artist + if (!IgnoreSpecialChars(_artist).Equals(IgnoreSpecialChars(strings[0]))) + { + validated = false; + } + // check title + if (!IgnoreSpecialChars(_title).Equals(IgnoreSpecialChars(strings[1]))) + { + validated = false; + } + } + return validated; + } + + private static string IgnoreSpecialChars(string orig) + { + return orig.Replace("\'", "").Replace("\"", "").Trim(); + } + + private static string CleanLyrics(StringBuilder lyricTemp) + { + lyricTemp.Replace("<br>", ""); + lyricTemp.Replace("<br/>", ""); + lyricTemp.Replace(""", "\""); + + return lyricTemp.ToString().Trim(); + } + + private void TimerElapsed(object sender, ElapsedEventArgs e) + { + _timer.Stop(); + _timer.Close(); + _timer.Dispose(); + + _lyric = "Not found"; + _complete = true; + Thread.CurrentThread.Abort(); + } + + private static string FixEscapeCharacters(string text) + { + text = text.Replace("(", ""); + text = text.Replace(")", ""); + text = text.Replace("#", ""); + text = text.Replace("/", ""); + + text = text.Replace("%", "%25"); + + text = text.Replace(" ", "%20"); + text = text.Replace("$", "%24"); + text = text.Replace("&", "%26"); + text = text.Replace("'", "%27"); + text = text.Replace("+", "%2B"); + text = text.Replace(",", "%2C"); + text = text.Replace(":", "%3A"); + text = text.Replace(";", "%3B"); + text = text.Replace("=", "%3D"); + text = text.Replace("?", "%3F"); + text = text.Replace("@", "%40"); + text = text.Replace("&", "&"); + + return text; + } + + private static string FixHebrew(string text) + { + text = text.Replace("\uC3A0", "%d7%90"); // \xE0 + text = text.Replace("\uC3A1", "%D7%91"); + text = text.Replace("\uC3A2", "%D7%92"); + text = text.Replace("\uC3A3", "%D7%93"); + text = text.Replace("\uC3A4", "%D7%94"); + text = text.Replace("\uC3A5", "%D7%95"); + text = text.Replace("\uC3A6", "%D7%96"); + text = text.Replace("\uC3A7", "%D7%97"); + text = text.Replace("\uC3A8", "%D7%98"); + text = text.Replace("\uC3A9", "%D7%99"); + text = text.Replace("\uC3AA", "%D7%9A"); + text = text.Replace("\uC3AB", "%D7%9B"); + text = text.Replace("\uC3AC", "%D7%9C"); + text = text.Replace("\uC3AD", "%D7%9D"); + text = text.Replace("\uC3AE", "%D7%9E"); + text = text.Replace("\uC3AF", "%D7%9F"); + text = text.Replace("\uC3B0", "%D7%A0"); + text = text.Replace("\uC3B1", "%D7%A1"); + text = text.Replace("\uC3B2", "%D7%A2"); + text = text.Replace("\uC3B3", "%D7%A3"); + text = text.Replace("\uC3B4", "%D7%A4"); + text = text.Replace("\uC3B5", "%D7%A5"); + text = text.Replace("\uC3B6", "%D7%A6"); + text = text.Replace("\uC3B7", "%D7%A7"); + text = text.Replace("\uC3B8", "%D7%A8"); + text = text.Replace("\uC3B9", "%D7%A9"); + text = text.Replace("\uC3BA", "%D7%AA"); // \xFA + + text = text.Replace("\uD790", "%d7%90"); // \xE0 + text = text.Replace("\uD791", "%D7%91"); + text = text.Replace("\uD792", "%D7%92"); + text = text.Replace("\uD793", "%D7%93"); + text = text.Replace("\uD794", "%D7%94"); + text = text.Replace("\uD795", "%D7%95"); + text = text.Replace("\uD796", "%D7%96"); + text = text.Replace("\uD797", "%D7%97"); + text = text.Replace("\uD798", "%D7%98"); + text = text.Replace("\uD799", "%D7%99"); + text = text.Replace("\uD79A", "%D7%9A"); + text = text.Replace("\uD79B", "%D7%9B"); + text = text.Replace("\uD79C", "%D7%9C"); + text = text.Replace("\uD79D", "%D7%9D"); + text = text.Replace("\uD79E", "%D7%9E"); + text = text.Replace("\uD79F", "%D7%9F"); + text = text.Replace("\uD7A0", "%D7%A0"); + text = text.Replace("\uD7A1", "%D7%A1"); + text = text.Replace("\uD7A2", "%D7%A2"); + text = text.Replace("\uD7A3", "%D7%A3"); + text = text.Replace("\uD7A4", "%D7%A4"); + text = text.Replace("\uD7A5", "%D7%A5"); + text = text.Replace("\uD7A6", "%D7%A6"); + text = text.Replace("\uD7A7", "%D7%A7"); + text = text.Replace("\uD7A8", "%D7%A8"); + text = text.Replace("\uD7A9", "%D7%A9"); + text = text.Replace("\uD7AA", "%D7%AA"); // \xFA + + return text; + } + } +} Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -27,8 +27,8 @@ // by using the '*' as shown below: -[assembly: AssemblyVersion("1.6.0.0")] -[assembly: AssemblyFileVersion("1.6.0.0")] +[assembly: AssemblyVersion("1.6.1.0")] +[assembly: AssemblyFileVersion("1.6.1.0")] // Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -5,7 +5,7 @@ { public static class Setup { - public static string[] BatchSearchSites = new string[7] + public static string[] BatchSearchSites = new string[8] { "LrcFinder", //"LyricWiki", @@ -14,7 +14,8 @@ "HotLyrics", "Actionext", "LyrDB", - "LyricsPluginSite" + "LyricsPluginSite", + "Shironet" }; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/About.Designer.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -80,7 +80,7 @@ this.lbInfo1.Name = "lbInfo1"; this.lbInfo1.Size = new System.Drawing.Size(197, 18); this.lbInfo1.TabIndex = 3; - this.lbInfo1.Text = "MyLyrics plugin, version 1.6.0.0"; + this.lbInfo1.Text = "MyLyrics plugin, version 1.6.1.0"; // // label2 // Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.Designer.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -50,6 +50,7 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbShironet = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.btClose = new System.Windows.Forms.Button(); this.btUpdate = new System.Windows.Forms.Button(); this.gbSearchInfo.SuspendLayout(); @@ -195,6 +196,7 @@ this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); this.gbLyricSites.Controls.Add(this.cbLyricsPluginSite); + this.gbLyricSites.Controls.Add(this.cbShironet); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(9, 115); this.gbLyricSites.Name = "gbLyricSites"; @@ -294,6 +296,19 @@ this.cbLyricsPluginSite.Text = "LyricsPlugin"; this.cbLyricsPluginSite.UseVisualStyleBackColor = true; // + // cbShironet + // + this.cbShironet.AutoSize = true; + this.cbShironet.Checked = true; + this.cbShironet.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbShironet.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbShironet.Location = new System.Drawing.Point(237, 21); + this.cbShironet.Name = "cbShironet"; + this.cbShironet.Size = new System.Drawing.Size(72, 17); + this.cbShironet.TabIndex = 15; + this.cbShironet.Text = "Shironet"; + this.cbShironet.UseVisualStyleBackColor = true; + // // btClose // this.btClose.Location = new System.Drawing.Point(361, 546); @@ -361,6 +376,7 @@ internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbShironet; private System.Windows.Forms.ListView lvSearchResults; private System.Windows.Forms.ColumnHeader cbSite; private System.Windows.Forms.ColumnHeader cbResult; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/FindLyric.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -111,6 +111,11 @@ "True") ? true : false; + cbShironet.Checked = + ((string)xmlreader.GetValueAsString("myLyrics", "useShironet", "True")).ToString().Equals( + "True") + ? true + : false; cbHotLyrics.Checked = ((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true @@ -206,6 +211,10 @@ { sitesToSearch.Add("LyricsPluginSite"); } + if (cbShironet.Checked) + { + sitesToSearch.Add("Shironet"); + } // If automaticUpdate is set then return after the first positive search m_EventStopThread = new ManualResetEvent(false); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/LyricsLibrary.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -6,7 +6,7 @@ using System.Windows.Forms; using LyricsEngine; using LyricsEngine.LRC; -using LyricsEngine.LyricSites; +using LyricsEngine.LyricsSites; using MediaPortal.Configuration; using MediaPortal.Music.Database; using MediaPortal.Profile; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MusicDatabaseBrowse.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -526,16 +526,14 @@ sitesToSearch.Add("LyrDB"); if (((string) xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).ToString().Equals("True")) sitesToSearch.Add("Lyrics007"); - if ( - ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals( - "True")) + if (((string) xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals("True")) sitesToSearch.Add("LyricsOnDemand"); if (((string) xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True")) sitesToSearch.Add("HotLyrics"); - if ( - ((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals( - "True")) + if (((string) xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).ToString().Equals("True")) sitesToSearch.Add("LyricsPluginSite"); + if (((string)xmlreader.GetValueAsString("myLyrics", "useShironet", "True")).ToString().Equals("True")) + sitesToSearch.Add("Shironet"); m_find = xmlreader.GetValueAsString("myLyrics", "find", ""); m_replace = xmlreader.GetValueAsString("myLyrics", "replace", ""); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -107,6 +107,7 @@ this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsPluginSite = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbShironet = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.trackBar = new System.Windows.Forms.TrackBar(); @@ -935,6 +936,7 @@ this.groupBox2.Controls.Add(this.cbLyricsOnDemand); this.groupBox2.Controls.Add(this.cbHotLyrics); this.groupBox2.Controls.Add(this.cbLyricsPluginSite); + this.groupBox2.Controls.Add(this.cbShironet); this.groupBox2.Location = new System.Drawing.Point(229, 48); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(301, 90); @@ -1040,6 +1042,20 @@ this.cbLyricsPluginSite.UseVisualStyleBackColor = true; this.cbLyricsPluginSite.Leave += new System.EventHandler(this.WriteMediaPortalXML); // + // cbShironet + // + this.cbShironet.AutoSize = true; + this.cbShironet.Checked = true; + this.cbShironet.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbShironet.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbShironet.Location = new System.Drawing.Point(230, 40); + this.cbShironet.Name = "cbShironet"; + this.cbShironet.Size = new System.Drawing.Size(80, 17); + this.cbShironet.TabIndex = 9; + this.cbShironet.Text = "Shironet"; + this.cbShironet.UseVisualStyleBackColor = true; + this.cbShironet.Leave += new System.EventHandler(this.WriteMediaPortalXML); + // // groupBox1 // this.groupBox1.Controls.Add(this.mpLabel2); @@ -1291,6 +1307,7 @@ private MediaPortal.UserInterface.Controls.MPGroupBox gbLyricSites; internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsPluginSite; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbShironet; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; private System.Windows.Forms.RadioButton rdLyricsMode; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -225,6 +225,7 @@ cbLyricsOnDemand.Checked = xmlreader.GetValue("myLyrics", "useLyricsOnDemand").Equals("True"); cbHotLyrics.Checked = xmlreader.GetValue("myLyrics", "useHotLyrics").Equals("True"); cbLyricsPluginSite.Checked = xmlreader.GetValue("myLyrics", "useLyricsPluginSite").Equals("True"); + cbShironet.Checked = xmlreader.GetValue("myLyrics", "useShironet").Equals("True"); } else { @@ -499,6 +500,8 @@ sitesToSearch.Add("HotLyrics"); if (cbLyricsPluginSite.Checked) sitesToSearch.Add("LyricsPluginSite"); + if (cbShironet.Checked) + sitesToSearch.Add("Shironet"); if (sitesToSearch.Count == 0) { @@ -1083,6 +1086,7 @@ { cbLyricsOnDemand.Checked = true; cbLyricsPluginSite.Checked = true; + cbShironet.Checked = true; cbLyrics007.Checked = false; cbLrcFinder.Checked = false; cbHotLyrics.Checked = false; @@ -1093,6 +1097,7 @@ { cbLyricsOnDemand.Checked = true; cbLyricsPluginSite.Checked = true; + cbShironet.Checked = true; cbLrcFinder.Checked = true; cbLyrics007.Checked = true; cbHotLyrics.Checked = false; @@ -1103,6 +1108,7 @@ { cbLyricsOnDemand.Checked = true; cbLyricsPluginSite.Checked = true; + cbShironet.Checked = true; cbLyrics007.Checked = true; cbLrcFinder.Checked = true; cbHotLyrics.Checked = true; @@ -1118,6 +1124,7 @@ cbLyrDB.Checked = true; cbActionext.Checked = true; cbLyricsPluginSite.Checked = true; + cbShironet.Checked = true; } if (sender != null) @@ -1135,6 +1142,7 @@ cbLrcFinder.Checked = true; cbHotLyrics.Checked = true; cbLyricsPluginSite.Checked = true; + cbShironet.Checked = true; trackBar.Value = 2; } @@ -1149,6 +1157,7 @@ cbLyrics007.Enabled = false; cbLrcFinder.Enabled = false; cbLyricsPluginSite.Enabled = false; + cbShironet.Enabled = false; cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; @@ -1167,6 +1176,7 @@ cbLyrics007.Enabled = true; cbLrcFinder.Enabled = true; cbLyricsPluginSite.Enabled = true; + cbShironet.Enabled = true; cbHotLyrics.Enabled = true; cbActionext.Enabled = true; cbLyrDB.Enabled = true; @@ -1182,11 +1192,13 @@ cbActionext.Checked = false; cbLyrDB.Checked = false; cbLyricsPluginSite.Checked = false; + cbShironet.Checked = false; cbLyricsOnDemand.Enabled = false; cbLyrics007.Enabled = false; cbLrcFinder.Enabled = false; cbLyricsPluginSite.Enabled = false; + cbShironet.Enabled = false; cbHotLyrics.Enabled = false; cbActionext.Enabled = false; cbLyrDB.Enabled = false; @@ -1229,6 +1241,7 @@ xmlwriter.SetValue("myLyrics", "useLyricsOnDemand", cbLyricsOnDemand.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useHotLyrics", cbHotLyrics.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricsPluginSite", cbLyricsPluginSite.Checked.ToString()); + xmlwriter.SetValue("myLyrics", "useShironet", cbShironet.Checked.ToString()); xmlwriter.SetValueAsBool("myLyrics", "useAutoscroll", cbUseAutoScrollAsDefault.Checked); xmlwriter.SetValueAsBool("myLyrics", "uploadLrcToLrcFinder", cbUploadLrcAutomatically.Checked); xmlwriter.SetValueAsBool("myLyrics", "alwaysAskUploadLrcToLrcFinder", cbAlwaysAskForUploadToLrcFinder.Checked); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -9,7 +9,7 @@ using System.Threading; using LyricsEngine; using LyricsEngine.LRC; -using LyricsEngine.LyricSites; +using LyricsEngine.LyricsSites; using MediaPortal.Configuration; using MediaPortal.Dialogs; using MediaPortal.GUI.Library; @@ -99,7 +99,8 @@ private bool _useLyrics007, _useLyricsOnDemand, - _useLyricsPluginSite; + _useLyricsPluginSite, + _useShironet; private bool _ValidLrcLyric; // A valid LRC-lyric always overwrites a normal lyric in both Lyrics db and music tag (if allowed) @@ -673,24 +674,13 @@ using (Settings xmlreader = new Settings("MediaPortal.xml")) { _UseID3 = xmlreader.GetValueAsBool("musicfiles", "showid3", true); - _useLrcFinder = (xmlreader.GetValueAsString("myLyrics", "useLrcFinder", "True")).Equals("True") - ? true - : false; - _useLyrics007 = (xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).Equals("True") - ? true - : false; - _useLyricsOnDemand = - (xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).Equals("True") ? true : false; - _useLyricsPluginSite = - (xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).Equals("True") - ? true - : false; - _useHotLyrics = (xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).Equals("True") - ? true - : false; - _useActionext = (xmlreader.GetValueAsString("myLyrics", "useActionext", "True")).Equals("True") - ? true - : false; + _useLrcFinder = (xmlreader.GetValueAsString("myLyrics", "useLrcFinder", "True")).Equals("True") ? true : false; + _useLyrics007 = (xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).Equals("True")? true : false; + _useLyricsOnDemand = (xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).Equals("True") ? true : false; + _useLyricsPluginSite = (xmlreader.GetValueAsString("myLyrics", "useLyricsPluginSite", "True")).Equals("True") ? true : false; + _useShironet= (xmlreader.GetValueAsString("myLyrics", "useShironet", "True")).Equals("True") ? true : false; + _useHotLyrics = (xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).Equals("True") ? true : false; + _useActionext = (xmlreader.GetValueAsString("myLyrics", "useActionext", "True")).Equals("True") ? true : false; _useLyrDB = (xmlreader.GetValueAsString("myLyrics", "useLyrDB", "True")).Equals("True") ? true : false; _enableLogging = xmlreader.GetValue("myLyrics", "loggingEnabled").Equals("True"); @@ -805,6 +795,10 @@ { sitesToSearch.Add("LyricsPluginSite"); } + if (_useShironet && Setup.IsMember("Shironet")) + { + sitesToSearch.Add("Shironet"); + } _LyricSitesTosearch = (string[])sitesToSearch.ToArray(typeof(string)); Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -43,5 +43,5 @@ // by using the '*' as shown below: -[assembly: AssemblyVersion("1.6.0.0")] -[assembly: AssemblyFileVersion("1.6.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.6.1.0")] +[assembly: AssemblyFileVersion("1.6.1.0")] \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/change log.txt 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/My Lyrics/change log.txt 2011-05-29 09:43:03 UTC (rev 4234) @@ -1,4 +1,4 @@ -Release notes to MyLyrics 1.6.0.0 +Release notes to MyLyrics 1.6.1.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,5 +33,6 @@ Compatible with MediaPortal 1.2.0 beta -Changes and fixes since version 1.5.5.0 -- Add: Now compatible with MediaPotal 1.2.0 beta \ No newline at end of file +Changes and fixes since version 1.6.1.0 +- Add: Support for Shiron.net (Hebrew site) +and some minor fixes \ No newline at end of file Modified: trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/TranslateProvider/Properties/AssemblyInfo.cs 2011-05-29 09:43:03 UTC (rev 4234) @@ -35,5 +35,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.2.0")] -[assembly: AssemblyFileVersion("1.5.2.0")] +[assembly: AssemblyVersion("1.6.1.0")] +[assembly: AssemblyFileVersion("1.6.1.0")] Modified: trunk/plugins/MyLyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/change log.txt 2011-05-28 19:58:30 UTC (rev 4233) +++ trunk/plugins/MyLyrics/change log.txt 2011-05-29 09:43:03 UTC (rev 4234) @@ -1,55 +1,38 @@ -Release notes to MyLyrics 1.21 +Release notes to MyLyrics 1.6.1.0 -MyLyrics is a windows plugin for MediaPortal which enables the display of lyrics for the currently played music file inside MediaPortal. -The plugin is able show LRC and plain lyrics, and uses both musictags and online searches to find lyrics. +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. Basic features: -* Dynamic search for the lyrics to currently playing music file. -* Browse your music database and select the songs for which you want to find lyrics. -* Batch search for lyrics matching songs in music database. -* Search single title and select amoung lyrics from various lyrics sites. -* Add/delete/edit lyrics and save changes in lyrics databases. -* Import/export lyrics to/from music tags. -* Include lyrics from the Internet, musictags, text- and lrc-files. -* Create a LRC from a basic lyric on the fly. +- Dynamic search for the lyric (both LRC's and plain lyrics) to the currently played music file. +- Browse your music database and select the songs to which you want to find lyrics. +- Batch search for lyrics matching songs in music database. +- Search single title and select amoung lyrics from various lyrics sites. +- Add/delete/edit lyrics and save changes in lyrics databases. +- Import/export lyrics to/from music tags. +- Include lyrics from the Internet, musictags, text- and lrc-files. +- Create a LRC from a basic lyric on the fly and share it with the community. Keys: -- W (or '#' button on remote): Toggle between basic and wide screen. -- E (or '*' button on remote): Toggle between lyric and editor screen. -- Enter (or 'OK' on remote): Tag line on LRC editor screen. +- E key (or '0' button on remote): Toggle between lyric and editor screen. +- P key: Toggle between LRC and LRC Pick screen. +- F key: Toggle between LRC and lyric mode. In lyric mode a new online search starts. +- S key: Increase the vertical scroll speed in scroll mode. A total of six speed available. +- Numeric keys (or left or right on remote) to select among various LRC's on LRC Pick screen +- Enter key (or 'OK' or '#' on remote): Tag line in LRC editor mode. +- Backslash key (or '*' on remote): Delete the last tagged line in LRC editor mode. +- F9 (or info button on remote): Shows context menu Screens: -- Lyrics basic: shows lyric with coverart on the right (default lyrics screen). -- Lyrics wide: shows wider lyric area and no coverart. -- LRC basic: shows lrc file and coverart on the right (default lrc screen). -- LRC wide: shows wider lrc area and no coverart (the plugin autoselects this if the lrc contains one or more long lines). -- LRC editor: enables the creation of lrc lyric from a plain lyric. +- Lyric: shows lyric with coverart on the right. + (Two sub modes for both Lyrics basic and Lyrics wide: static (default) or scroll mode) +- LRC: shows lrc file and coverart on the right. +- LRC pick: uses BennieBoy's LRCFinder to select among different matching LRC entries. +- LRC editor: enables the creation of lrc lyric from a plain lyric. +- Translation screen. See a translated version of the lyric. -Compatible with MediaPortal 1.0.0.0 final. +Compatible with MediaPortal 1.2.0 beta -Installation: -Simple copy the content of the zip-file into your MP library (typical C:\Program Files\Team MediaPortal\MediaPortal). - -Noteworthy changes since version 1.10: -* Add: Support for the lyric site LyrDB. -* Add: On the Lyrics database tab you can choose to see only the LRCs of your lyrics database. -* Fix: Vertical black lines caused by use of "\r\n" in Label controls is eliminated by using "\n" instead. -* Fix: Show previous screen issue and back trace issues with MP fixed. -* Fix: Blue3 and Blue3wide skins optimized. - -Skin Support: -All supported skins (or at least the ones I'm aware of) are listed here: MyLyrics skin library - -For skinners: -Due to a change in the MP Gui engine in March 2008 all label controls need a <width> tag to be shown. -That means all controls of the type "label" must have the tag <width>x</width> where x is the width in pixels. -920 pixels is good value for most 16:9 skins. - -In short, the following controls must be updated with the tag <width>920</width>: -id: 200-212 -id: 300-312 -id: 400-412 -id: 500-512 -id: 600-612 - -The change is needed for the LRC and LRC editor modes to work. \ No newline at end of file +Changes and fixes since version 1.6.1.0 +- Add: Support for Shiron.net (Hebrew site) +and some minor fixes \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |