From: <sa...@us...> - 2009-06-26 19:24:47
|
Revision: 2965 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2965&view=rev Author: saamand Date: 2009-06-26 19:24:43 +0000 (Fri, 26 Jun 2009) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.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 trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs trunk/plugins/MyLyrics/My Lyrics/change log.txt Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LrcFinder.cs 2009-06-26 19:24:43 UTC (rev 2965) @@ -86,7 +86,7 @@ private bool LrcReturned(string lrc) { - if (!lrc.Equals("Not found") && !lrc.Equals("NOT FOUND") && lrc.Length != 0) + if (lrc != null && !lrc.Equals("Not found") && !lrc.Equals("NOT FOUND") && lrc.Length != 0) { return true; } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.Designer.cs 2009-06-26 19:24:43 UTC (rev 2965) @@ -121,6 +121,7 @@ this.tabPageAbout = new System.Windows.Forms.TabPage(); this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); + this.cbEnableLogging = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabControl.SuspendLayout(); this.tabPageDatabase.SuspendLayout(); this.gbGenerel.SuspendLayout(); @@ -829,9 +830,9 @@ this.cbMoveSongFrom.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.cbMoveSongFrom.Location = new System.Drawing.Point(16, 46); this.cbMoveSongFrom.Name = "cbMoveSongFrom"; - this.cbMoveSongFrom.Size = new System.Drawing.Size(341, 17); + this.cbMoveSongFrom.Size = new System.Drawing.Size(294, 17); this.cbMoveSongFrom.TabIndex = 7; - this.cbMoveSongFrom.Text = "Move lyrics from marked database to lyrics database when updated"; + this.cbMoveSongFrom.Text = "Move lyrics from marked to lyrics database when updated"; this.cbMoveSongFrom.UseVisualStyleBackColor = true; this.cbMoveSongFrom.Leave += new System.EventHandler(this.WriteMediaPortalXML); // @@ -851,6 +852,7 @@ // // mpGroupBox2 // + this.mpGroupBox2.Controls.Add(this.cbEnableLogging); this.mpGroupBox2.Controls.Add(this.tbPluginName); this.mpGroupBox2.Controls.Add(this.lbPluginName); this.mpGroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; @@ -867,7 +869,7 @@ this.tbPluginName.Location = new System.Drawing.Point(94, 19); this.tbPluginName.MaxLength = 30; this.tbPluginName.Name = "tbPluginName"; - this.tbPluginName.Size = new System.Drawing.Size(144, 20); + this.tbPluginName.Size = new System.Drawing.Size(129, 20); this.tbPluginName.TabIndex = 13; this.tbPluginName.Text = "My Lyrics"; this.tbPluginName.Leave += new System.EventHandler(this.WriteMediaPortalXML); @@ -1191,6 +1193,18 @@ this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted); this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged); // + // cbEnableLogging + // + this.cbEnableLogging.AutoSize = true; + this.cbEnableLogging.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbEnableLogging.Location = new System.Drawing.Point(360, 20); + this.cbEnableLogging.Name = "cbEnableLogging"; + this.cbEnableLogging.Size = new System.Drawing.Size(94, 17); + this.cbEnableLogging.TabIndex = 11; + this.cbEnableLogging.Text = "Enable logging"; + this.cbEnableLogging.UseVisualStyleBackColor = true; + this.cbEnableLogging.Leave += new System.EventHandler(this.WriteMediaPortalXML); + // // MyLyricsSetup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1338,5 +1352,6 @@ private MediaPortal.UserInterface.Controls.MPTextBox tbLrcTaggingName; private MediaPortal.UserInterface.Controls.MPLabel lbLrcTaggingName; public MediaPortal.UserInterface.Controls.MPTabControl tabControl; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbEnableLogging; } } \ 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 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.cs 2009-06-26 19:24:43 UTC (rev 2965) @@ -36,6 +36,10 @@ MusicDatabaseBrowse musicDatabaseBrowseUC; Information informationUC; + private string log; + private string logFileName = "MyLyrics_Batch.log"; + private string logFullFileName = ""; + // events used to stop worker thread ManualResetEvent m_EventStopThread; @@ -79,6 +83,7 @@ bool m_DisregardVariousArtist = true; bool m_SearchOnlyMarkedSongs = false; + bool m_enableLogging = false; bool m_automaticWriteToMusicTag = true; bool m_automaticReadFromToMusicTag = true; @@ -205,6 +210,15 @@ else if (sitesMode.Equals(rbUserSelectMode.Tag)) { 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"); + cbLyricsOnDemand.Checked = xmlreader.GetValue("myLyrics", "useLyricsOnDemand").Equals("True"); + cbSeekLyrics.Checked = xmlreader.GetValue("myLyrics", "useSeekLyrics").Equals("True"); + cbHotLyrics.Checked = xmlreader.GetValue("myLyrics", "useHotLyrics").Equals("True"); } else { @@ -215,6 +229,8 @@ tbLimit.Text = xmlreader.GetValueAsString("myLyrics", "limit", m_TotalTitles.ToString()); tbPluginName.Text = xmlreader.GetValueAsString("myLyrics", "pluginsName", "My Lyrics"); + m_enableLogging = xmlreader.GetValue("myLyrics", "loggingEnabled").Equals("True"); + cbEnableLogging.Checked = m_enableLogging; cbAutoFetch.Checked = xmlreader.GetValue("myLyrics", "automaticFetch").Equals("yes"); cbAutomaticUpdate.Checked = xmlreader.GetValue("myLyrics", "automaticUpdateWhenFirstFound").Equals("yes"); @@ -363,6 +379,7 @@ private void btStartBatchSearch_Click(object sender, System.EventArgs e) { + if (bgWorkerSearch.IsBusy) { Thread.Sleep(2000); @@ -372,6 +389,49 @@ MyLyricsSetup.UpdateLibraryUI = true; + m_Limit = int.Parse(tbLimit.Text); + + if (m_Limit == 0) + { + ThreadFinished = new string[] { "", "", "You must select a number of songs to search", "error" }; + return; + } + + if (m_enableLogging) + { + + logFullFileName = Config.GetFile(Config.Dir.Log, logFileName); + + FileStream file = null; + StreamReader sr = null; + System.IO.StreamWriter writerLog = null; + + //if file is not found, create a new xml file + if (!System.IO.File.Exists(logFullFileName)) + { + file = new FileStream(logFullFileName, FileMode.OpenOrCreate, FileAccess.Write); + file.Close(); + sr = File.OpenText(logFullFileName); + log = sr.ReadToEnd(); + sr.Close(); + log += DateTime.Now.ToString() + " The log has been created.\r\n"; + writerLog = new System.IO.StreamWriter(logFullFileName); + writerLog.Write(log); + writerLog.Close(); + } + + file = new FileStream(logFullFileName, FileMode.OpenOrCreate, FileAccess.Write); + file.Close(); + sr = File.OpenText(logFullFileName); + log = sr.ReadToEnd(); + sr.Close(); + log += "\r\n"; + log += DateTime.Now.ToString() + string.Format(" ***** New batch search for {0} lyrics started *****.\r\n", m_Limit); + writerLog = new System.IO.StreamWriter(logFullFileName); + writerLog.Write(log); + writerLog.Close(); + } + stopwatch.StartZero(); lbTimer.Text = "00:00.00"; timer = new System.Windows.Forms.Timer(); @@ -396,15 +456,6 @@ btStartBatchSearch.Enabled = false; - m_Limit = int.Parse(tbLimit.Text); - - - if (m_Limit == 0) - { - ThreadFinished = new string[] { "", "", "You must select a number of songs to search", "error" }; - return; - } - m_DisregardKnownLyric = cbDontSearchSongsInLyricDB.Enabled && cbDontSearchSongsInLyricDB.Checked; m_MarkSongsWhenNoLyricFound = cbMarkSongsWithNoLyrics.Enabled && cbMarkSongsWithNoLyrics.Checked; m_DisregardMarkedLyric = cbDisregardSongsWithNoLyric.Enabled && cbDisregardSongsWithNoLyric.Checked; @@ -506,6 +557,19 @@ lbLastActivity2.Text = capArtist + " - " + capTitle + " has a match at " + site + ".\r\n"; + if (m_enableLogging) + { + StreamReader sr = File.OpenText(logFullFileName); + log = sr.ReadToEnd(); + sr.Close(); + string logText = capArtist + " - " + capTitle + " has a match at " + site + ".\r\n"; + log += DateTime.Now.ToString() + " " + logText; + lbLastActivity2.Text = logText; + System.IO.StreamWriter writerLog = new System.IO.StreamWriter(logFullFileName); + writerLog.Write(log); + writerLog.Close(); + } + progressBar.PerformStep(); this.Update(); } @@ -531,6 +595,19 @@ lbLastActivity2.Text = "No match for \"" + capArtist + " - " + capTitle + "\".\r\n"; + if (m_enableLogging) + { + StreamReader sr = File.OpenText(logFullFileName); + log = sr.ReadToEnd(); + sr.Close(); + string logText = "No match found to " + capArtist + " - " + capTitle + ".\r\n"; + log += DateTime.Now.ToString() + " " + logText; + lbLastActivity2.Text = logText; + System.IO.StreamWriter writerLog = new System.IO.StreamWriter(logFullFileName); + writerLog.Write(log); + writerLog.Close(); + } + progressBar.PerformStep(); this.Update(); } @@ -574,6 +651,20 @@ btStartBatchSearch.Enabled = true; btCancel.Enabled = false; isSearching(false); + + if (m_enableLogging) + { + StreamReader sr = File.OpenText(logFullFileName); + log = sr.ReadToEnd(); + sr.Close(); + string logText = string.Format("The batch has ended with {0} found and {1} missed .\r\n", m_LyricsFound, m_LyricsNotFound); + log += DateTime.Now.ToString() + " " + logText; + log += DateTime.Now.ToString() + " ***** Batch search ended *****\r\n\r\n"; + lbLastActivity2.Text = logText; + System.IO.StreamWriter writerLog = new System.IO.StreamWriter(logFullFileName); + writerLog.Write(log); + writerLog.Close(); + } } // Called from worker thread using delegate and Control.Invoke @@ -1143,10 +1234,11 @@ sitesMode = rbLrcMode.Tag as string; } + xmlwriter.SetValue("myLyrics", "pluginsName", tbPluginName.Text); + xmlwriter.SetValue("myLyrics", "loggingEnabled", cbEnableLogging.Checked.ToString()); xmlwriter.SetValue("myLyrics", "sitesMode", sitesMode); xmlwriter.SetValue("myLyrics", "defaultSitesModeValue", trackBar.Value); xmlwriter.SetValue("myLyrics", "limit", tbLimit.Text); - xmlwriter.SetValue("myLyrics", "pluginsName", tbPluginName.Text); xmlwriter.SetValue("myLyrics", "useLrcFinder", cbLrcFinder.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricWiki", cbLyricWiki.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useActionext", cbActionext.Checked.ToString()); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics Configuration/MyLyricsSetup.resx 2009-06-26 19:24:43 UTC (rev 2965) @@ -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 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2009-06-26 19:24:43 UTC (rev 2965) @@ -88,6 +88,8 @@ string m_LastLyricText = ""; string m_LastFileName = ""; + string m_LastStreamFile = string.Empty; + int m_crossfade = 0; int m_SearchingState = 0; @@ -245,40 +247,52 @@ public override void Process() { - if (m_newTrack || m_SearchingState != (int)SEARCH_STATE.NOT_SEARCHING) + if ((m_newTrack || m_SearchingState != (int)SEARCH_STATE.NOT_SEARCHING) + && (!g_Player.IsRadio || !string.IsNullOrEmpty(m_artist))) { if (m_newTrack) { m_alreadyValidLRC = false; + m_lyricsFound = false; + StopThread(); + m_newTrack = false; + MusicDatabase mDB = MusicDatabase.Instance; - m_CurrentTrackTag = mDB.GetTag(g_Player.CurrentFile); GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_LRCPICK_STATUS, ""); - m_lyricsFound = false; - StopThread(); - m_newTrack = false; - - if (m_CurrentTrackTag != null) + if (g_Player.IsRadio == false) { - m_artist = m_CurrentTrackTag.Artist.Trim(); - m_artist = m_artist.Replace("| ", ""); - m_artist = m_artist.Replace(" |", ""); - m_artist = m_artist.Replace("''", "'"); - m_title = m_CurrentTrackTag.Title.Trim(); - m_title = m_title.Replace("''", "'"); + m_CurrentTrackTag = mDB.GetTag(g_Player.CurrentFile); - getAlbumArt(); + if (m_CurrentTrackTag != null) + { + m_artist = m_CurrentTrackTag.Artist.Trim(); + m_artist = m_artist.Replace("| ", ""); + m_artist = m_artist.Replace(" |", ""); + m_artist = m_artist.Replace("''", "'"); + m_title = m_CurrentTrackTag.Title.Trim(); + m_title = m_title.Replace("''", "'"); + + getAlbumArt(); + } } + else + { + getAlbumArt(m_artist); + } } - if (m_CurrentTrackTag != null) + if (m_CurrentTrackTag != null || g_Player.IsRadio) { - m_CurrentTrackTag.Artist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); - m_CurrentTrackTag.Title = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); - m_CurrentTrackTag.Lyrics = LyricUtil.FixLyrics(m_CurrentTrackTag.Lyrics); + if (!g_Player.IsRadio) + { + m_CurrentTrackTag.Artist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); + m_CurrentTrackTag.Title = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); + m_CurrentTrackTag.Lyrics = LyricUtil.FixLyrics(m_CurrentTrackTag.Lyrics); + } if (m_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_AUTO || m_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC @@ -375,7 +389,7 @@ m_lyricsFound = false; StopThread(); - if (m_CurrentTrackTag.Artist.Length != 0) + if (!string.IsNullOrEmpty(m_artist)) { FindLyric(); } @@ -605,6 +619,7 @@ { StopThread(); resetAll(); + resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); GUIGraphicsContext.ScrollSpeedVertical = m_startingScrollSpeedVertical; @@ -646,8 +661,14 @@ { TagLine(); } - else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(101)) + else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(101)) // 'E' { + // Don't use a stream to create a LRC + if (g_Player.IsRadio) + { + return; + } + m_lyricsFound = false; if (m_selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) { @@ -811,11 +832,14 @@ StartShowingLrc(m_LyricText, true); } } - else if (action.m_key.KeyChar.Equals(8)) // 'Backslash' { RemoveLatestTagLine(); } + else if (action.m_key.KeyChar.Equals(98)) // 'B' (stop playing media) + { + resetGUI(m_selectedScreen); + } break; } case Action.ActionType.ACTION_REWIND: @@ -843,19 +867,6 @@ { if (tag2.Equals("#Play.Current.Track")) // track has changed { - //if (!m_LyricText.Equals(string.Empty) - // && (string.IsNullOrEmpty(m_CurrentTrackTag.Lyrics) || m_ValidLrcLyric)) - //{ - // m_ValidLrcLyric = false; - // m_LastLyricText = m_LyricText; - // m_LastFileName = m_CurrentTrackTag.FileName; - - // if (m_AutomaticWriteToMusicTag) - // { - // TagReaderUtil.WriteLyrics(m_LastFileName, m_LastLyricText); ; - // } - //} - if (value.Length != 0) // additional check { m_basicScreenSelected = null; @@ -881,6 +892,40 @@ GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); } } + else if (g_Player.IsRadio) + { + string newArtist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); + string newTitle = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); + + if (string.IsNullOrEmpty(GUIPropertyManager.GetProperty("#Play.Current.Artist")) + || string.IsNullOrEmpty(GUIPropertyManager.GetProperty("#Play.Current.Title"))) + { + 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) + || !newArtist.Equals(m_artist) || !newTitle.Equals(m_title)) + { + resetGUI(m_selectedScreen); + StopThread(); + resetAll(); + + m_basicScreenSelected = null; + + m_SearchType = (int)SEARCH_TYPES.BOTH_LRCS_AND_LYRICS; + m_SearchingState = (int)SEARCH_STATE.NOT_SEARCHING; + + m_LastStreamFile = g_Player.CurrentFile; + + m_LastFileName = g_Player.CurrentFile; + m_artist = newArtist; + m_title = newTitle; + + m_newTrack = true; + + Process(); + } + } else if (m_selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC || m_selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC || m_selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) @@ -922,7 +967,7 @@ resetGUI((int)MyLyricsSettings.Screen.LRC_BASIC); - if (m_CurrentTrackTag != null && m_CurrentTrackTag.Artist != "") + if ((m_CurrentTrackTag != null && m_CurrentTrackTag.Artist != "") || g_Player.IsRadio) { m_TrackText = m_artist + " - " + m_title; @@ -942,7 +987,8 @@ #region 1) LRC in music tag - if (m_AutomaticReadFromMusicTag && ((m_CurrentTrackTag.Lyrics.Length != 0 + if (m_AutomaticReadFromMusicTag && g_Player.IsRadio == false + && m_CurrentTrackTag != null &&((m_CurrentTrackTag.Lyrics.Length != 0 && (m_SimpleLrc = new SimpleLRC(m_artist, m_title, m_CurrentTrackTag.Lyrics)).IsValid))) { if (m_SimpleLrc.IsValid) @@ -1020,7 +1066,7 @@ private bool FindLyric() { - if (m_CurrentTrackTag != null && m_CurrentTrackTag.Artist != "") + if ((m_CurrentTrackTag != null && m_CurrentTrackTag.Artist != "") || g_Player.IsRadio) { string lyricText = string.Empty; @@ -1034,7 +1080,8 @@ { #region 4) Lyric in music tag - if (m_AutomaticReadFromMusicTag && m_CurrentTrackTag.Lyrics.Length != 0 + if (m_AutomaticReadFromMusicTag && g_Player.IsRadio == false + && m_CurrentTrackTag != null && m_CurrentTrackTag.Lyrics.Length != 0 && !((m_SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) && new SimpleLRC(m_artist, m_title, m_CurrentTrackTag.Lyrics).IsValid)) { string lyric = LyricUtil.FixLyrics(m_CurrentTrackTag.Lyrics); @@ -1047,7 +1094,7 @@ #region 5) Lyric in music database if (lyricText.Length != 0 && - !((m_SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) && new SimpleLRC(m_artist, m_title, m_CurrentTrackTag.Lyrics).IsValid)) + !((m_SearchType == (int)SEARCH_TYPES.ONLY_LYRICS) && m_CurrentTrackTag != null && new SimpleLRC(m_artist, m_title, m_CurrentTrackTag.Lyrics).IsValid)) { LyricFound = new Object[] { lyricText, m_artist, m_title, "lyrics database" }; return true; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsExternCode.cs 2009-06-26 19:24:43 UTC (rev 2965) @@ -43,7 +43,19 @@ AddImageToImagePathContainer(m_CurrentThumbFileName); } - m_CurrentThumbFileName = GUIMusicFiles.GetArtistCoverArtName(m_CurrentTrackTag.Artist); + UpdateImagePathContainer(); + } + + public void getAlbumArt(string artist) + { + m_ImagePathContainer.Clear(); + + m_PreviousTrackTag = null; + m_CurrentTrackTag = null; + m_NextTrackTag = null; + + m_CurrentThumbFileName = MediaPortal.Util.Utils.GetCoverArtName(Thumbs.MusicArtists, artist); + if (m_CurrentThumbFileName.Length > 0) { // let us test if there is a larger cover art image Modified: trunk/plugins/MyLyrics/My Lyrics/change log.txt =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/change log.txt 2009-06-26 16:01:48 UTC (rev 2964) +++ trunk/plugins/MyLyrics/My Lyrics/change log.txt 2009-06-26 19:24:43 UTC (rev 2965) @@ -1,4 +1,4 @@ -Release notes to MyLyrics 1.30 +Release notes to MyLyrics 1.31 MyLyrics 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. @@ -36,16 +36,9 @@ 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.23: -* Add: Support for LRCFinder webservice (a big, BIG thank you to BennieBoy!). -* Add: New screen "LRC pick" added (enter and leave by pressing 'P'). -* Add: Option to upload manual created LRC file to LRCFinder and share it with the community (default disabled). -* Add: Toggle between LRC and lyric mode with hotkey 'F'. -* Add: LRC mode added to the configuration (search only for LRC-files). -* Add: In LRC editor mode 'backslash' can be used to erase the latest tagged line. -* Add: LRC editor mode screen extended to include coverart. -* Add: New GUI item "LRC pick status" added to skin (ID 1011). -* Fix: Blue3 skin modified. -* Fix: Deleted entries in "Find & replace" dialogue were not removed correctly. -* Fix: Performance improvement when deleting entry in lyrics database. +Noteworthy changes since version 1.30: +* Add: Support for Last.fm streams +* Add: Support for ShoutCast streams +* Add: Logging has been reintroduced for better support (has to be enabled in configuration). +* Fix: Too high thread level introduced memory when searching for 5000+ songs in batch. * and a lot of 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. |