diff --git a/src/de/schildbach/pte/BahnProvider.java b/src/de/schildbach/pte/BahnProvider.java
index 93b7637f..84eb1f0c 100644
--- a/src/de/schildbach/pte/BahnProvider.java
+++ b/src/de/schildbach/pte/BahnProvider.java
@@ -484,7 +484,7 @@ public final class BahnProvider implements NetworkProvider
if (ParserUtils.timeDiff(parsed.getTime(), currentTime) < -PARSER_DAY_ROLLOVER_THRESHOLD_MS)
parsed.add(Calendar.DAY_OF_MONTH, 1);
- return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, destination);
+ return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, 0, destination);
}
private static final Pattern P_NORMALIZE_LINE_NUMBER = Pattern.compile("\\d{2,5}");
diff --git a/src/de/schildbach/pte/Departure.java b/src/de/schildbach/pte/Departure.java
index 1e1fcbea..a7ce0e07 100644
--- a/src/de/schildbach/pte/Departure.java
+++ b/src/de/schildbach/pte/Departure.java
@@ -27,13 +27,15 @@ public final class Departure
final public Date time;
final public String line;
final public int[] lineColors;
+ final public int destinationId;
final public String destination;
- public Departure(final Date time, final String line, final int[] lineColors, final String destination)
+ public Departure(final Date time, final String line, final int[] lineColors, final int destinationId, final String destination)
{
this.time = time;
this.line = line;
this.lineColors = lineColors;
+ this.destinationId = destinationId;
this.destination = destination;
}
@@ -45,6 +47,8 @@ public final class Departure
builder.append(",");
builder.append(line != null ? line : "null");
builder.append(",");
+ builder.append(destinationId);
+ builder.append(",");
builder.append(destination != null ? destination : "null");
builder.append(")");
return builder.toString();
@@ -66,6 +70,8 @@ public final class Departure
return false;
if (this.line != null && !this.line.equals(other.line))
return false;
+ if (this.destinationId != other.destinationId)
+ return false;
if (!this.destination.equals(other.destination))
return false;
return true;
@@ -79,6 +85,8 @@ public final class Departure
if (line != null)
hashCode += line.hashCode();
hashCode *= 29;
+ hashCode += destinationId;
+ hashCode *= 29;
hashCode += destination.hashCode();
return hashCode;
}
diff --git a/src/de/schildbach/pte/MvvProvider.java b/src/de/schildbach/pte/MvvProvider.java
index 69ef65e6..62289ac5 100644
--- a/src/de/schildbach/pte/MvvProvider.java
+++ b/src/de/schildbach/pte/MvvProvider.java
@@ -522,7 +522,7 @@ public class MvvProvider implements NetworkProvider
calendar.set(Calendar.MINUTE, Integer.parseInt(mDepFine.group(4)));
final String normalizedLine = normalizeLine(mDepFine.group(5), mDepFine.group(6));
final String destination = normalizeStationName(mDepFine.group(7));
- final Departure departure = new Departure(calendar.getTime(), normalizedLine, LINES.get(normalizedLine), destination);
+ final Departure departure = new Departure(calendar.getTime(), normalizedLine, LINES.get(normalizedLine), 0, destination);
departures.add(departure);
}
else
diff --git a/src/de/schildbach/pte/RmvProvider.java b/src/de/schildbach/pte/RmvProvider.java
index 5c99e213..202a14e0 100644
--- a/src/de/schildbach/pte/RmvProvider.java
+++ b/src/de/schildbach/pte/RmvProvider.java
@@ -480,7 +480,7 @@ public class RmvProvider implements NetworkProvider
if (ParserUtils.timeDiff(parsed.getTime(), currentTime) < -PARSER_DAY_ROLLOVER_THRESHOLD_MS)
parsed.add(Calendar.DAY_OF_MONTH, 1);
- return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, destination);
+ return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, 0, destination);
}
private static final Pattern P_NORMALIZE_LINE = Pattern.compile("([A-Za-zÄÖÜäöüß]+)[\\s-]*(.*)");
diff --git a/src/de/schildbach/pte/SbbProvider.java b/src/de/schildbach/pte/SbbProvider.java
index c5a458f2..b4866226 100644
--- a/src/de/schildbach/pte/SbbProvider.java
+++ b/src/de/schildbach/pte/SbbProvider.java
@@ -430,7 +430,7 @@ public class SbbProvider implements NetworkProvider
if (ParserUtils.timeDiff(parsed.getTime(), currentTime) < -PARSER_DAY_ROLLOVER_THRESHOLD_MS)
parsed.add(Calendar.DAY_OF_MONTH, 1);
- return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, destination);
+ return new Departure(parsed.getTime(), line, line != null ? LINES.get(line.charAt(0)) : null, 0, destination);
}
private static final Pattern P_NORMALIZE_LINE = Pattern.compile("([A-Za-zÄÖÜäöüß]+)[\\s-]*(.*)");
diff --git a/src/de/schildbach/pte/VbbProvider.java b/src/de/schildbach/pte/VbbProvider.java
index e3847e01..bce2e345 100644
--- a/src/de/schildbach/pte/VbbProvider.java
+++ b/src/de/schildbach/pte/VbbProvider.java
@@ -451,15 +451,15 @@ public final class VbbProvider implements NetworkProvider
return uri.toString();
}
- private static final Pattern P_DEPARTURES_HEAD = Pattern.compile(".*(.*?).*Datum:(.*?)
.*", Pattern.DOTALL);
+ private static final Pattern P_DEPARTURES_HEAD = Pattern.compile(".*?(.*?).*?Datum:(.*?)
.*", Pattern.DOTALL);
private static final Pattern P_DEPARTURES_COARSE = Pattern.compile(
"