Adjust default connection time.

This commit is contained in:
Edward Betts 2026-04-09 15:40:15 +01:00
parent b487307d4a
commit ad1aa57c00
2 changed files with 6 additions and 6 deletions

8
app.py
View file

@ -124,15 +124,15 @@ def results(station_crs, slug, travel_date):
try:
min_connection = int(request.args.get("min_connection", 50))
except ValueError:
min_connection = 50
min_connection = 70
if min_connection not in VALID_MIN_CONNECTIONS:
min_connection = 50
min_connection = 70
try:
max_connection = int(request.args.get("max_connection", 110))
except ValueError:
max_connection = 110
max_connection = 150
if max_connection not in VALID_MAX_CONNECTIONS:
max_connection = 110
max_connection = 150
user_agent = request.headers.get("User-Agent", rtt_scraper.DEFAULT_UA)

View file

@ -49,7 +49,7 @@
</label>
<select id="min_connection" name="min_connection" class="form-control">
{% for mins in valid_min_connections %}
<option value="{{ mins }}" {% if mins == 50 %}selected{% endif %}>{{ mins }} min</option>
<option value="{{ mins }}" {% if mins == 70 %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>
@ -60,7 +60,7 @@
</label>
<select id="max_connection" name="max_connection" class="form-control">
{% for mins in valid_max_connections %}
<option value="{{ mins }}" {% if mins == 110 %}selected{% endif %}>{{ mins }} min</option>
<option value="{{ mins }}" {% if mins == 150 %}selected{% endif %}>{{ mins }} min</option>
{% endfor %}
</select>
</div>