Package net.roarsoftware.lastfm.scrobble

Examples of net.roarsoftware.lastfm.scrobble.Scrobbler


  private void scrobbleSong(Session session) {
    long now = System.currentTimeMillis() / 1000;
    long totalPlayed = now - startPlaybackTime;
    if (totalPlayed > 40) {
      try {
        Scrobbler scrobbler = getScrobbler(session);
        if (scrobbler != null) {
          ResponseStatus status = scrobbler.submit(currentTrack.getArtist(), currentTrack.getName(),
              currentTrack.getAlbum(), currentTrack.getDuration(), currentTrack.getPosition(),
              Source.USER, startPlaybackTime);
          LOGGER.debug("Submit OK: " + status.ok());
        } else {
          LOGGER.error("Can't scrobble now");
View Full Code Here


      public void run() {
        try {
          getSendMsnInfo().sendPlayingInfo(currentTrack.getArtist(), currentTrack.getName(),
              currentTrack.getAlbum(), true);
          setMusicName(currentTrack.getArtist() + " - " + currentTrack.getName());
          Scrobbler scrobbler = getScrobbler(session);
          if (scrobbler != null) {
            ResponseStatus status = scrobbler.nowPlaying(currentTrack.getArtist(), currentTrack.getName());
            LOGGER.debug("Submit OK: " + status.ok());
          } else {
            LOGGER.error("Can't scrobble now");
          }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of net.roarsoftware.lastfm.scrobble.Scrobbler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.