Skip to content

Commit 7a8e936

Browse files
authored
Merge pull request #31 from stadtnavi/vvs-route-id
Custom behaviour for hbg feed
2 parents 6fd9a29 + 5be67a2 commit 7a8e936

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ def parse_route_id(feed, route_id, trip_id, otp_data):
55
if len(route_id) > 5 and (route_id[-5:] == "47374" or route_id[-5:] == "56920" or route_id[-5:] == "10299"):
66
return route_id[0:-5]
77
return route_id[0:-4]
8+
if feed == "hbg":
9+
if route_id is not None and ':' in trip_id:
10+
return trip_id[:trip_id.rfind(':')+1]
11+
812
return route_id
913

1014
def parse_short_name(feed, trip_id, route_id, otp_data):

0 commit comments

Comments
 (0)