protected void updateSearchIndex() throws ApplicationException {
short page = 0, totalPages = 0;
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());