/** * 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); }
/** * 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); }