Last.fm - personalized radio streams in MediaPortal!

IchBinsShort

Portal Pro
January 3, 2008
682
28


AW: Last.fm - personalized radio streams in MediaPortal!

I found a solution. I would delete my Music-Database and make a new scan, so maybe it helps. But then I saw in this Folder a .xml file from Last.FM with the cached songs. I have deleted it, and now it works fine. Maybee this Solution could be added to a FAQ or the Wiki. Because another User has this problem...
 

Dadeo

Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    113
    Himalayas, India
    Hi IchBinsShort - anyone can update the Wiki ;) as long as you login with your forum user name. Before I add it I just want to verify the file you deleted was LastSmartPlaylist.xml ?

    EDIT: Is it possible some of the files in your lastfmplaylist were no longer on your hdd or in a diff location? Just wondering why that file would cause/solve the issue.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    113
    Hornslet
    When playing music from a CD or MP3-file, #Play.Current.Thumb is filled with the thumb from that album.
    When I enter Last.FM it is overwritten with something else, anyhow the thumb now disappears.
    Going back to home-screen now has a missing thumbnail.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    113
    Hornslet
    ...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());
          }
        }
    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();
          }
        }
    Could someone (rtv)? fix this?
     
    Thread starter Similar threads Forum Replies Date
    D Listen Music 2
    U Listen Music 1
    Helios61 Listen Music 8
    thesystemera Listen Music 0
    chrisonline Listen Music 6
    Top Bottom