You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RT departures were limited to the route with which the entity was defined whereas it covers all direct trips between start/stop locations, also for other routes
''' Get next rt departure for route (multiple) or trip (single) '''
173
176
# explanatory logic
174
-
# sources can provide tip_id with or without route, route with or without direction hence a lot of conditions as the resultset has (!) to include the direction
177
+
# sources can provide trip_id with or without route, route with or without direction hence a lot of conditions as the resultset has (!) to include the direction
175
178
# if route-based info is required, for start/end stops, then one needs to cover also for routes without direction_id and thus trip
176
179
# if response does not provide a direction_id then use trip_id, make directon temporarily nn and when the stop is identified make it equal to the requesting direction
177
180
# in this case the trip still covers the direction
# first part covers start/end and thus multiple RT are possible for the same stop, also, for SIRI route_id do not match so a 'in' is used
230
237
# the second part covers local stops, i.e. per trip, so only one RT possible for that stop
231
-
if (self._rt_group=="route"and (str(direction_id) ==str(self._direction) and (route_id==self._route_idorself._route_idinroute_id)) or (direction_id=="nn"andtrip_id==self._trip_id) or (self._trip_idintrip_id)) or (self._rt_group=="trip"and (trip_id==self._trip_idorself._trip_idintrip_id)) orentity_id==self._trip_short_name:
232
-
238
+
ifself._rt_group=="route":
239
+
# route-mode, between predefined start/stop
240
+
ifdirection_id!="nn":
241
+
matched= (
242
+
str(direction_id) ==str(self._direction)
243
+
and (route_id==self._route_idorself._route_idinroute_id)
0 commit comments