예제 #1
0
  /**
   * Removes entries from playlist.
   *
   * @param songIds entries IDs.
   * @throws MPDServerException if an error occur while contacting server.
   */
  public void removeById(int[] songIds) throws MPDServerException {
    for (int id : songIds)
      this.mpd.getMpdConnection().queueCommand(MPD_CMD_PLAYLIST_REMOVE_ID, Integer.toString(id));
    this.mpd.getMpdConnection().sendCommandQueue();

    for (int id : songIds) list.removeById(id);
  }
예제 #2
0
 /**
  * Remove playlist entry with ID songId
  *
  * @param songId id of the entry to be removed.
  * @throws MPDServerException if an error occur while contacting server.
  */
 public void removeById(int songId) throws MPDServerException {
   this.mpd.getMpdConnection().sendCommand(MPD_CMD_PLAYLIST_REMOVE_ID, Integer.toString(songId));
   list.removeById(songId);
 }