use of se.light.assembly64.model.StringKeys in project assembly64fx by freabemania.
the class PlaylistService method deleteSongs.
public void deleteSongs(PlaylistInfo playlist, List<PlaylistEntry> playlistEntry) {
StringKeys keys = StringKeys.of(playlistEntry.stream().map(item -> String.valueOf(item.getSongId())).collect(Collectors.toList()));
getClient().target(getBackendServer()).path("/leet/playlistsnew/deletesongs/" + playlist.getId()).request().header("email", getSessionInfo().getEmail()).header("token", getSessionInfo().getToken()).put(Entity.json(keys)).close();
List<PlaylistEntry> list = getSongsForPlaylist(playlist);
keys.getKeys().stream().forEach(item -> list.removeIf(entry -> entry.getSongId().equals(item)));
flushLocalList(playlist, list);
playlist.setChecksum(getChksum(list));
flushPlaylistInfo();
Analytics.sendEvent("sidify", "deletesong");
}
Aggregations