Skip to content

Commit

Permalink
Disable disruptions for now
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Bossert <[email protected]>
  • Loading branch information
sirtoobii committed Jul 29, 2023
1 parent f824aa9 commit b6feb6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/de/schildbach/pte/CHSearchProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public class CHSearchProvider extends AbstractNetworkProvider {
private static final DateFormat DATE_FORMATTER = new SimpleDateFormat("MM/dd/yyyy");
private static final DateFormat TIME_FORMATTER = new SimpleDateFormat("HH:mm");
protected static final SimpleDateFormat DATE_TIME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
// Since a while disruptions seem to be broken on the search.ch api...
private static final boolean DISABLE_DISRUPTIONS = true;


private final List<Capability> CAPABILITIES = Arrays.asList(
Expand Down Expand Up @@ -672,7 +674,7 @@ public Leg(JSONObject rawLeg) throws JSONException, ParseException {
this.isAddress = rawLeg.has("isaddress") && rawLeg.getBoolean("isaddress");
this.exit = rawLeg.has("exit") ? new Exit(rawLeg.getJSONObject("exit")) : null;
this.cancelled = rawLeg.has("cancelled") && rawLeg.getBoolean("cancelled");
this.disruptions = Disruption.extractDisruptionsToList(rawLeg);
this.disruptions = DISABLE_DISRUPTIONS ? new ArrayList<>() : Disruption.extractDisruptionsToList(rawLeg);

if (rawLeg.has("stops") && !rawLeg.isNull("stops")) {
JSONArray rawStops = rawLeg.getJSONArray("stops");
Expand Down

0 comments on commit b6feb6b

Please sign in to comment.