Skip to content

Commit

Permalink
SBB wagon sequence: parse no-passage coaches
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-albers committed Jan 16, 2025
1 parent c8042b0 commit 5d73e18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/TripKit/Provider/Implementations/SbbProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ public class SbbProvider: AbstractNetworkProvider {

let loadFactor = parseLoadFactor(from: wagonJson["occupancy"])
wagons.append(Wagon(number: number, orientation: nil, trackPosition: trackPosition, attributes: attributes, firstClass: firstClass, secondClass: secondClass, loadFactor: loadFactor))

if wagonJson["displayNoPassageIcon"].boolValue {
wagonGroups.append(WagonGroup(designation: "", wagons: wagons, destination: wagonGroupJson["direction"].string, lineLabel: nil))
wagons = []
}
}

wagonGroups.append(WagonGroup(designation: "", wagons: wagons, destination: wagonGroupJson["direction"].string, lineLabel: nil))
Expand Down

0 comments on commit 5d73e18

Please sign in to comment.