--- android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/MetroFetcher.java 2010/09/13 17:57:31 1042 +++ android/TrainInfoService/src/dk/thoerup/traininfoservice/banedk/MetroFetcher.java 2010/09/13 18:53:30 1043 @@ -39,7 +39,7 @@ Logger logger = Logger.getLogger(MetroFetcher.class.getName()); StationDAO stationDAO = new StationDAO(); - Map cache = new TimeoutMap(1000); + Map cache = new TimeoutMap(60000); //TODO: make metro cache timeout configurable public MetroBean cachedLookupMetroDepartures(int stationID) throws Exception { final String key = "metro:" + stationID; @@ -100,8 +100,16 @@ bean.entries.add(entry); } - bean.operationInfo = contentElems.get(3).text(); - bean.plan = contentElems.get(5).text(); + bean.operationInfo = contentElems.get(3).text(); + + int planIndex; + if (contentElems.get(4).text().trim().equalsIgnoreCase("stationsinformation")) { + planIndex = 7; + } else { + planIndex = 5; + } + + bean.plan = contentElems.get(planIndex).text(); return bean; }