Package net.roarsoftware.lastfm

Examples of net.roarsoftware.lastfm.Result


  }

  public void processBan() throws Exception {
    if (isPlaying && currentTrack != null) {
      Session session = login(Config.getValue(Config.USER), Config.getValue(Config.PASSWORD));
      Result result = Track.ban(currentTrack.getArtist(), currentTrack.getName(), session);
      if (result.isSuccessful()) {
        LOGGER.debug("LOVE IT!");
        setShowStatuswMessage("BANNED");
      } else {
        LOGGER.debug("Not possible to set BAN: " + result.getErrorMessage());
      }
      processSkip();
    }
  }
View Full Code Here


  }

  public void processLove() throws Exception {
    if (isPlaying && currentTrack != null) {
      Session session = login(Config.getValue(Config.USER), Config.getValue(Config.PASSWORD));
      Result result = Track.love(currentTrack.getArtist(), currentTrack.getName(), session);
      if (result.isSuccessful()) {
        LOGGER.debug("LOVE IT!");
        setShowStatuswMessage("LOVE IT!");
      } else {
        LOGGER.debug("Not possible to set Love: " + result.getErrorMessage());
      }

    }
  }
View Full Code Here

    LOGGER.error(string);
  }

  public List<String> getRecentStations(String user, Session session) {
    List<String> recentStations = new ArrayList<String>();
    Result result = Caller.getInstance().call("user.getRecentStations", session, "user", user);
    if (!result.isSuccessful())
      return Collections.emptyList();
    DomElement element = result.getContentElement();
    for (DomElement stationElement : element.getChildren("station")) {
      // for (DomElement lista : stationElement.getChildren()) {
      // LOGGER.debug(lista.getTagName());
      // }
      // for (DomElement urlElement : stationElement.getChildren("name"))
View Full Code Here

    return radio;
  }

  private String getRecentStation(String user, Session session) {
    List<String> recentStations = new ArrayList<String>();
    Result result = Caller.getInstance().call("user.getRecentStations", session, "user", user);
    if (!result.isSuccessful())
      return null;
    DomElement element = result.getContentElement();
    for (DomElement stationElement : element.getChildren("station")) {
      // for (DomElement lista : stationElement.getChildren()) {
      // LOGGER.debug(lista.getTagName());
      // }
      // for (DomElement urlElement : stationElement.getChildren("name"))
View Full Code Here

TOP

Related Classes of net.roarsoftware.lastfm.Result

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.