From 75f2d7a063443c388a3e739500544f66320cc490 Mon Sep 17 00:00:00 2001 From: Rob Holland Date: Thu, 13 Feb 2025 17:14:59 +0000 Subject: [PATCH] Reduce the number of train options returned. --- thirdparty/train_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/train_api.py b/thirdparty/train_api.py index d5dd584..a48b1c8 100644 --- a/thirdparty/train_api.py +++ b/thirdparty/train_api.py @@ -82,7 +82,7 @@ class TrainServer(BaseHTTPRequestHandler): # Generate outbound journeys year, month, day, hour, minute = out_datetime - for offset in [-60, -30, 0, 30, 60]: + for offset in [-30, 0, 30]: # Calculate journey times adj_minutes = minute + offset adj_hour = hour + (adj_minutes // 60) @@ -118,7 +118,7 @@ class TrainServer(BaseHTTPRequestHandler): # Generate return journeys if return datetime provided if ret_datetime[0] is not None: year, month, day, hour, minute = ret_datetime - for offset in [-60, -30, 0, 30, 60]: + for offset in [-30, 0, 30]: adj_minutes = minute + offset adj_hour = hour + (adj_minutes // 60) adj_minute = adj_minutes % 60