do {
WSResponse wsResponse = client.getLibraryTracks(page,
lastFmSettingsService.getLastFmUsername());
if (wsResponse.wasCallAllowed() && wsResponse.wasCallSuccessful()) {
StringUtil stringUtil = new StringUtil(wsResponse.getResponseBody());
ScrobbledTracksParser parser = new ScrobbledTracksParserImpl(
stringUtil.getInputStream());
totalPages = parser.getTotalPages();
trackPlayCountDao.createTrackPlayCounts(parser.getTrackPlayCounts());
setTotalOperations(totalPages);
addFinishedOperation();
}
} while (++page < totalPages);
}