Closed deingithub closed 4 months ago
Thanks for the (as always) detailed report!
For now I'll leave it at a simple update of the productbits definition. I think in the long run I'll, at the very least, add backend-specific help texts that explain what the abbreviations inside the mot / productbits list mean. I already know which GitHub issue I can rely on for the ÖBB part :)
Thanks for the quick fix, the reports are fun to write ^^
Sorry for another headache around the Austrians :p
The ÖBB profile has the bitmask
[qw[ice ice ice regio regio s bus ferry u tram ice ondemand ice]]
. The way themot_mask
function is written leads to the "ICE" product mask only containing the last mention of it in the array and overwriting the earlier ones without including them into the mask: https://github.com/derf/Travel-Status-DE-DeutscheBahn/blob/aebdbb0d3f0521503ce46ff679ad2eb822503f0d/lib/Travel/Status/DE/HAFAS.pm#L510-L513The result is that when requesting with a
-m ice
filter you only get regiojet departures (mask1000000000000
/4096) instead of regiojet, ec/ic and rj/rjx/ice departures (mask1000000000101
/4101):Note also that the way the SCOTTY webapp currently renders its product filter has slightly more differentiation:
1000000000101
=100000000000
Regiojet +100
IC/EC +1
RJ/RJX/ICE)1000
D/NJ/EN)10000
R, REX, CJX, …)100000
)100000000
)1000000000
)1000000
)10000000
)100000000000
)10
)The simplest fix for this would be just giving each category its name and letting API users reconstruct the long distance category as presented on SCOTTY on their own, combining them into one category as the current implementation intends to might also be an option, but would be more complicated and require a rewrite of the
mot_mask
function.