Question

I would like to retrieve the genre of the track/ album being currently played in Spotify.

I've looked at Last.FM for getting the genre from the album or from the track but it seems there is no option.

Please can someone help me to find the genre via a web service?

Était-ce utile?

La solution

I would reccomend using Echo Nest API as Last.fm only uses user inputted tags, which aren't always helpful.

Autres conseils

Do you get this problem in the MusicStore Project? If you do, open Album.cs, find this :

public Genre Genre { get; set; }
public Artist Artist { get; set; }

and add a virtual attribute like:

public virtual Genre Genre { get; set; }
public virtual Artist Artist { get; set; }
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top