home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Listen Music
Last.fm - personalized radio streams in MediaPortal!
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="pilehave" data-source="post: 817761" data-attributes="member: 71550"><p>...and problem is in GUILastFM.cs:</p><p></p><p>[CODE]</p><p> private void Worker_LoadSettings()</p><p> {</p><p> try</p><p> {</p><p> // Will be stopped on success or error</p><p> GUIWaitCursor.Show();</p><p></p><p> // Do the tasks needed everytime we enter the plugin:</p><p> string ThumbFileName = String.Empty;</p><p> if (AudioscrobblerBase.CurrentPlayingSong != null &&</p><p> AudioscrobblerBase.CurrentPlayingSong.Artist != String.Empty)</p><p> {</p><p> // If we leave and reenter the plugin try to set the correct duration</p><p> SetDuration(AudioscrobblerBase.CurrentPlayingSong, false);</p><p> ThumbFileName = Util.Utils.GetCoverArtName(Thumbs.MusicArtists, AudioscrobblerBase.CurrentPlayingSong.Artist);</p><p> }</p><p> // repopulate the facade after maybe exiting the plugin</p><p> //if (facadeRadioPlaylist != null)</p><p> //{</p><p> // facadeRadioPlaylist.Clear();</p><p> // foreach (Song listTrack in _radioTrackList)</p><p> // {</p><p> // GUIGraphicsContext.form.Invoke(new ThreadFacadeAddItem(AddItemToFacadeControl), new object[] { listTrack });</p><p> // }</p><p> //}</p><p> SetThumbnails(ThumbFileName);</p><p> _scrobbleUsers = MusicDatabase.Instance.GetAllScrobbleUsers();</p><p> // Do proper first time initialisation</p><p> if (!LastFMStation.IsInit || LastFMStation.AccountUser != AudioscrobblerBase.Username)</p><p> LastFMStation.LoadSettings(true);</p><p> else</p><p> OnRadioSettingsSuccess();</p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> Log.Error("GUIRadioLastFM: Error loading settings - {0}", ex.ToString());</p><p> }</p><p> }</p><p>[/CODE]</p><p></p><p>which is run as a thread everytime the plugin is loaded. This calls SetThumbnails(ThumbFileName);</p><p></p><p>[CODE]</p><p> private void SetThumbnails(string artistThumbPath_)</p><p> {</p><p> // GUITextureManager.CleanupThumbs();</p><p> string thumb = artistThumbPath_;</p><p></p><p> if (thumb.Length <= 0)</p><p> {</p><p> thumb = GUIGraphicsContext.Skin + @"\media\missing_coverart.png";</p><p> }</p><p> else</p><p> {</p><p> // let us test if there is a larger cover art image</p><p> string strLarge = Util.Utils.ConvertToLargeCoverArt(thumb);</p><p> if (Util.Utils.FileExistsInCache(strLarge))</p><p> {</p><p> thumb = strLarge;</p><p> }</p><p> }</p><p> GUIPropertyManager.SetProperty("#Play.Current.ArtistThumb", thumb);</p><p></p><p> string albumthumb = Util.Utils.GetCoverArtName(Thumbs.MusicAlbum, AudioscrobblerBase.CurrentPlayingSong.Album);</p><p> if (Util.Utils.FileExistsInCache(albumthumb))</p><p> {</p><p> string strLarge = Util.Utils.ConvertToLargeCoverArt(albumthumb);</p><p> if (Util.Utils.FileExistsInCache(strLarge))</p><p> {</p><p> albumthumb = strLarge;</p><p> }</p><p></p><p> GUIPropertyManager.SetProperty("#Play.Current.Thumb", albumthumb);</p><p> }</p><p> else</p><p> {</p><p> GUIPropertyManager.SetProperty("#Play.Current.Thumb", String.Empty);</p><p> }</p><p></p><p> if (imgArtistArt != null)</p><p> {</p><p> imgArtistArt.SetFileName(thumb);</p><p> //imgArtistArt.Dispose();</p><p> //imgArtistArt.AllocResources();</p><p> }</p><p> }</p><p>[/CODE]</p><p></p><p>Could someone (rtv)? fix this?</p></blockquote><p></p>
[QUOTE="pilehave, post: 817761, member: 71550"] ...and problem is in GUILastFM.cs: [CODE] private void Worker_LoadSettings() { try { // Will be stopped on success or error GUIWaitCursor.Show(); // Do the tasks needed everytime we enter the plugin: string ThumbFileName = String.Empty; if (AudioscrobblerBase.CurrentPlayingSong != null && AudioscrobblerBase.CurrentPlayingSong.Artist != String.Empty) { // If we leave and reenter the plugin try to set the correct duration SetDuration(AudioscrobblerBase.CurrentPlayingSong, false); ThumbFileName = Util.Utils.GetCoverArtName(Thumbs.MusicArtists, AudioscrobblerBase.CurrentPlayingSong.Artist); } // repopulate the facade after maybe exiting the plugin //if (facadeRadioPlaylist != null) //{ // facadeRadioPlaylist.Clear(); // foreach (Song listTrack in _radioTrackList) // { // GUIGraphicsContext.form.Invoke(new ThreadFacadeAddItem(AddItemToFacadeControl), new object[] { listTrack }); // } //} SetThumbnails(ThumbFileName); _scrobbleUsers = MusicDatabase.Instance.GetAllScrobbleUsers(); // Do proper first time initialisation if (!LastFMStation.IsInit || LastFMStation.AccountUser != AudioscrobblerBase.Username) LastFMStation.LoadSettings(true); else OnRadioSettingsSuccess(); } catch (Exception ex) { Log.Error("GUIRadioLastFM: Error loading settings - {0}", ex.ToString()); } } [/CODE] which is run as a thread everytime the plugin is loaded. This calls SetThumbnails(ThumbFileName); [CODE] private void SetThumbnails(string artistThumbPath_) { // GUITextureManager.CleanupThumbs(); string thumb = artistThumbPath_; if (thumb.Length <= 0) { thumb = GUIGraphicsContext.Skin + @"\media\missing_coverart.png"; } else { // let us test if there is a larger cover art image string strLarge = Util.Utils.ConvertToLargeCoverArt(thumb); if (Util.Utils.FileExistsInCache(strLarge)) { thumb = strLarge; } } GUIPropertyManager.SetProperty("#Play.Current.ArtistThumb", thumb); string albumthumb = Util.Utils.GetCoverArtName(Thumbs.MusicAlbum, AudioscrobblerBase.CurrentPlayingSong.Album); if (Util.Utils.FileExistsInCache(albumthumb)) { string strLarge = Util.Utils.ConvertToLargeCoverArt(albumthumb); if (Util.Utils.FileExistsInCache(strLarge)) { albumthumb = strLarge; } GUIPropertyManager.SetProperty("#Play.Current.Thumb", albumthumb); } else { GUIPropertyManager.SetProperty("#Play.Current.Thumb", String.Empty); } if (imgArtistArt != null) { imgArtistArt.SetFileName(thumb); //imgArtistArt.Dispose(); //imgArtistArt.AllocResources(); } } [/CODE] Could someone (rtv)? fix this? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Listen Music
Last.fm - personalized radio streams in MediaPortal!
Contact us
RSS
Top
Bottom