Last.fm - personalized radio streams in MediaPortal! (1 Viewer)

IchBinsShort

Portal Pro
January 3, 2008
683
54
Home Country
Germany Germany
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
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    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.
     

    IchBinsShort

    Portal Pro
    January 3, 2008
    683
    54
    Home Country
    Germany Germany
    AW: Last.fm - personalized radio streams in MediaPortal!

    Oh it was not the solution, it works only for a few minutes. The only Solution was to delete the Database and make a new Search.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    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
    521
    Hornslet
    Home Country
    Denmark Denmark
    ...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?
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    The last.fm plugin is a bit of a legacy one now. Perhaps it would be simpler to just change the skin property name to something like #music.lastFM.currentArtist ???
     

    Users who are viewing this thread

    Top Bottom