From: <sa...@us...> - 2007-10-29 20:30:30
|
Revision: 1014 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1014&view=rev Author: saamand Date: 2007-10-29 13:30:27 -0700 (Mon, 29 Oct 2007) Log Message: ----------- Version 1.0 beta 1 Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/My Lyrics/Changelog.txt trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -1,6 +1,8 @@ using System; using System.Collections; using System.Text; +using System.IO; +using System.IO.IsolatedStorage; namespace LyricsEngine.LRC { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -24,6 +24,9 @@ private bool m_StopSearches; + private bool m_allowAllToComplete; + private bool m_automaticUpdate; + ArrayList threadList = new ArrayList(); // Main thread sets this event to stop LyricController @@ -36,9 +39,12 @@ public LyricsController(ILyricForm mainForm, ManualResetEvent eventStopThread, - string[] lyricSites, bool allowAllToSearch) + string[] lyricSites, + bool allowAllToSearch, bool automaticUpdate) { this.m_Form = mainForm; + this.m_allowAllToComplete = allowAllToSearch; + this.m_automaticUpdate = automaticUpdate; noOfLyricsToSearch = 1; noOfLyricsSearched = 0; @@ -133,7 +139,7 @@ // create worker thread instance ThreadStart easySitesThreadInstance = delegate { - LyricSearch lyricSearch_EasySites = new LyricSearch(this, artist, title); + LyricSearch lyricSearch_EasySites = new LyricSearch(this, artist, title, m_allowAllToComplete, m_automaticUpdate); lyricSearch_EasySites.Run(); }; @@ -173,7 +179,7 @@ internal void LyricFound(String lyricStrings, String artist, String title, String site) { - if (m_StopSearches == false) + if (m_allowAllToComplete || m_StopSearches == false) { m_Form.LyricFound = new Object[] { lyricStrings, artist, title, site }; StatusUpdate(artist, title, site, true); @@ -182,7 +188,7 @@ internal void LyricNotFound(String artist, String title, String message, String site) { - if (m_StopSearches == false) + if (m_allowAllToComplete || m_StopSearches == false) { m_Form.LyricNotFound = new Object[] { artist, title, message, site }; StatusUpdate(artist, title, site, false); Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -11,6 +11,7 @@ { class EvilLabs { + string lyric = ""; bool complete; System.Timers.Timer timer; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -143,6 +143,7 @@ lyricTemp.Replace("?v", "'v"); lyricTemp.Replace("<p>", " \r\n"); lyricTemp.Replace("<BR>", " \r\n"); + lyricTemp.Replace("<br />", " \r\n"); lyric = lyricTemp.ToString().Trim(); Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.22")] +[assembly: AssemblyVersion("0.23")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/Changelog.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Changelog.txt 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/My Lyrics/Changelog.txt 2007-10-29 20:30:27 UTC (rev 1014) @@ -1,3 +1,6 @@ +Changes from version 0.23 to 0.24: +- Fix: Better for + Changes from version 0.14 to 0.15: - Fix: A LOT of performance improvemence issues and code-clean up - Fix: One lyric site added (HotLyrics), and one removed (SeekLyrics) due to instable server Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -666,7 +666,7 @@ { lyricsFound = false; - lc = new LyricsController(this, m_EventStopThread, m_sitesToSearch, false); + lc = new LyricsController(this, m_EventStopThread, m_sitesToSearch, false, false); // create worker thread instance ThreadStart job = delegate { Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-10-29 20:30:27 UTC (rev 1014) @@ -5,7 +5,7 @@ <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}</ProjectGuid> - <OutputType>Library</OutputType> + <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MyLyrics</RootNamespace> <AssemblyName>MyLyrics</AssemblyName> @@ -64,61 +64,61 @@ <Compile Include="Convert\ConvertFromXMLtoLyricsDatabase.cs" /> <Compile Include="MyLyricsExternCode.cs" /> <Compile Include="MyLyricsSettings.cs" /> - <Compile Include="MyLyricsSetup_test.cs" /> + <Compile Include="MyLyrics Configuration\MyLyricsSetup_test.cs" /> <Compile Include="DatabaseUtil.cs" /> <Compile Include="MyLyrics.cs" /> - <Compile Include="MyLyricsSetup.cs"> + <Compile Include="MyLyrics Configuration\MyLyricsSetup.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="MyLyricsSetup.Designer.cs"> + <Compile Include="MyLyrics Configuration\MyLyricsSetup.Designer.cs"> <DependentUpon>MyLyricsSetup.cs</DependentUpon> </Compile> - <Compile Include="MyLyricsSetup_AddNewSong.cs"> + <Compile Include="MyLyrics Configuration\AddNewSong.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="MyLyricsSetup_AddNewSong.Designer.cs"> - <DependentUpon>MyLyricsSetup_AddNewSong.cs</DependentUpon> + <Compile Include="MyLyrics Configuration\AddNewSong.Designer.cs"> + <DependentUpon>AddNewSong.cs</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="MyLyricsSetup_LyricsLibrary.cs"> + <Compile Include="MyLyrics Configuration\LyricsLibrary.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Include="MyLyricsSetup_LyricsLibrary.Designer.cs"> - <DependentUpon>MyLyricsSetup_LyricsLibrary.cs</DependentUpon> + <Compile Include="MyLyrics Configuration\LyricsLibrary.Designer.cs"> + <DependentUpon>LyricsLibrary.cs</DependentUpon> </Compile> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> - <Compile Include="MyLyricsSetup_SearchTitleDialog.cs"> + <Compile Include="MyLyrics Configuration\FindLyric.cs"> <SubType>Form</SubType> </Compile> - <Compile Include="MyLyricsSetup_SearchTitleDialog.Designer.cs"> - <DependentUpon>MyLyricsSetup_SearchTitleDialog.cs</DependentUpon> + <Compile Include="MyLyrics Configuration\FindLyric.Designer.cs"> + <DependentUpon>FindLyric.cs</DependentUpon> </Compile> </ItemGroup> <ItemGroup> - <EmbeddedResource Include="MyLyricsSetup_LyricsLibrary.resx"> + <EmbeddedResource Include="MyLyrics Configuration\LyricsLibrary.resx"> <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup_LyricsLibrary.cs</DependentUpon> + <DependentUpon>LyricsLibrary.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="MyLyricsSetup.resx"> + <EmbeddedResource Include="MyLyrics Configuration\MyLyricsSetup.resx"> <SubType>Designer</SubType> <DependentUpon>MyLyricsSetup.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="MyLyricsSetup_AddNewSong.resx"> + <EmbeddedResource Include="MyLyrics Configuration\AddNewSong.resx"> <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup_AddNewSong.cs</DependentUpon> + <DependentUpon>AddNewSong.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> <SubType>Designer</SubType> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> - <EmbeddedResource Include="MyLyricsSetup_SearchTitleDialog.resx"> + <EmbeddedResource Include="MyLyrics Configuration\FindLyric.resx"> <SubType>Designer</SubType> - <DependentUpon>MyLyricsSetup_SearchTitleDialog.cs</DependentUpon> + <DependentUpon>FindLyric.cs</DependentUpon> </EmbeddedResource> </ItemGroup> <ItemGroup> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -34,13 +34,6 @@ GetTrackTags(); CurrentThumbFileName = GUIMusicFiles.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); - - if (CurrentThumbFileName.Length < 1) // no ThumbFile currently -> check if there is a folder.jpg - { - CurrentThumbFileName = String.Format(@"{0}\folder.jpg", MediaPortal.Util.Utils.RemoveTrailingSlash(System.IO.Path.GetDirectoryName(CurrentTrackFileName))); - if (!System.IO.File.Exists(CurrentThumbFileName)) CurrentThumbFileName = string.Empty; - } - if (CurrentThumbFileName.Length > 0) { // let us test if there is a larger cover art image @@ -118,7 +111,7 @@ { bool isCurSongCdTrack = IsCdTrack(CurrentTrackFileName); bool isNextSongCdTrack = IsCdTrack(NextTrackFileName); - MusicDatabase dbs = new MusicDatabase(); + MusicDatabase dbs = MusicDatabase.Instance; if (CurrentTrackTag != null) PreviousTrackTag = CurrentTrackTag; Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-10-29 14:04:34 UTC (rev 1013) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-10-29 20:30:27 UTC (rev 1014) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.22")] -[assembly: AssemblyFileVersion("0.22")] +[assembly: AssemblyVersion("0.23")] +[assembly: AssemblyFileVersion("0.23")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |