0

I am writing my small project, which I need to download music album data.

I tried to use last.fm API and I have a strange error :)

     public HelpLastFmItemSearch(string albumName)
    {
        //For test
        albumName = "Meteora";


      string _albumsSearchURL =  "http://ws.audioscrobbler.com/2.0/?method=album.search&album=" + albumName + "&api_key="+ Api.LastFMKeySingleton.Instance.getApiKey()+"&format=json";
      HttpClient albumSearchClient = new HttpClient();
      var jsonAlbumsSearch = albumSearchClient.GetStringAsync(_albumsSearchURL);
      var deserializeJsonAlbumsSearch = JsonConvert.DeserializeObject<dynamic>(jsonAlbumsSearch.Result);
      var deserializeJsonAlbumsSearchTest = JsonConvert.DeserializeObject<ViewHelp_Music.AddMusic.LastFm_Api.AlbumSearch.HelpLastFMJsonAlbumsSearch>(jsonAlbumsSearch.Result);
        //Testing !
        var _artistname = deserializeJsonAlbumsSearchTest.Results.Albummatches.Album[0].Artist;
        var _albumname = deserializeJsonAlbumsSearchTest.Results.Albummatches.Album[0].Name;


        string _albumInfoURL = "http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=" + Api.LastFMKeySingleton.Instance.getApiKey() + "&artist=" + _artistname + "&album=" + _albumname + "&format=json";
        HttpClient albumInfoClient = new HttpClient();
        var jsonAlbumInfo = albumInfoClient.GetStringAsync(_albumInfoURL);
        var deserializeJsonAlbumInfo = JsonConvert.DeserializeObject<dynamic>(jsonAlbumInfo.Result);
        var deserializeJsonAlbumInfoTest = JsonConvert.DeserializeObject<ViewHelp_Music.AddMusic.LastFm_Api.AlbumInfo.HelpLastFMJsonAlbumInfo>(jsonAlbumInfo.Result);


        //////Do Poprawy!
    }

enter image description here

What am I doing wrong?

Community
  • 1
  • 1
Deivid.PL
  • 31
  • 6

1 Answers1

0

Have you tried this?

Function evaluation timed out when examining variables in debug/stepping through

The most likely cause of this problem is an implicit evaluation of a property or ToString method which causes an issue with the CLR evaluation thread. To verify this turn off implicit evaluation.

  • Tools -> Options
  • Debugging
  • Uncheck "Enable property evaluation and other implicit function calls"

Then restart your scenario and see if it works."

mikaelrs
  • 335
  • 1
  • 10
  • Thanks for the answer, but it has not changed anything. Variables have values, but I get this error and I thought something was wrong in code. – Deivid.PL Jun 22 '17 at 11:14