IOpac: recognize ready reservations
@@ -888,11 +888,16 @@ public class IOpac extends BaseApi implements OpacApi {
item.setTitle(tr.child(0).text().trim().replace("\u00a0", ""));
item.setAuthor(tr.child(1).text().trim().replace("\u00a0", ""));
+ String readyDate = tr.child(4).text().trim().replace("\u00a0", "");
+ if (readyDate.equals("")) {
+ item.setStatus("bereit");
+ } else {
try {
item.setReadyDate(
- fmt.parseLocalDate(tr.child(4).text().trim().replace("\u00a0", "")));
+ fmt.parseLocalDate(readyDate));
} catch (IllegalArgumentException e) {
- item.setStatus(tr.child(4).text().trim().replace("\u00a0", ""));
+ item.setStatus(readyDate);
+ }
}
if (tr.select("a").size() > 0) {
item.setCancelData(tr.select("a").last().attr("href"));
