1

I use the java api for binding last.fm http://www.lastfm.fr/api to extract some information about querlques songs.

I search songs according tags and I want to get the playcount of each song that matches the tag that I took, but the playcount me always returns -1.

Collection<Track> tracks=Tag.getTopTracks("Believe", key);

    for (Track track : tracks) {
        System.out.println("chanson:"+track.getName());
        System.out.println("playcount: "+track.getPlaycount());
        System.out.println("\n***************************************************");

    }
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
FRIDI Mourad
  • 87
  • 1
  • 6
  • 16

1 Answers1

0

Must recover the tracks (each from their id or others) and find another way into the binding which makes the link with http://www.lastfm.fr/api/show/track.getInfo

   for (Track track : tracks) {
        Track chanson=track.getInfo(track.getArtist(), track.getName(),key);
        System.out.println("chanson:"+chanson.getName());
        System.out.println("Playcount:"+chanson.getPlaycount());
        System.out.println("\n***************************************************");

    }
FRIDI Mourad
  • 87
  • 1
  • 6
  • 16